summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2005-11-30 10:03:22 +0000
committerChristian Heim <phreak@gentoo.org>2005-11-30 10:03:22 +0000
commit4979098b2f4324a062eeaebe3039fd596d8b4e28 (patch)
treef832d482627bf1b28b2b14df8e25858a465fa272 /sbin
parentImport the latest baselayout changes. Merging revision 1634. (diff)
downloadbaselayout-vserver-4979098b2f4324a062eeaebe3039fd596d8b4e28.tar.gz
baselayout-vserver-4979098b2f4324a062eeaebe3039fd596d8b4e28.tar.bz2
baselayout-vserver-4979098b2f4324a062eeaebe3039fd596d8b4e28.zip
Import the latest baselayout changes. Merging revision 1648.
svn path=/baselayout-vserver/trunk/; revision=123
Diffstat (limited to 'sbin')
-rwxr-xr-xsbin/functions.sh4
-rwxr-xr-xsbin/runscript.sh5
2 files changed, 9 insertions, 0 deletions
diff --git a/sbin/functions.sh b/sbin/functions.sh
index ab39a45..e635de1 100755
--- a/sbin/functions.sh
+++ b/sbin/functions.sh
@@ -46,6 +46,10 @@ RC_DEFAULT_INDENT=2
#RC_DOT_PATTERN=' .'
RC_DOT_PATTERN=''
+# Setup i18n variables
+TEXTDOMAINDIR="${svclib}/locale"
+TEXTDOMAIN="rc-scripts"
+
# void import_addon(char *addon)
#
# Import code from the specified addon if it exists
diff --git a/sbin/runscript.sh b/sbin/runscript.sh
index 6e7404c..67626ed 100755
--- a/sbin/runscript.sh
+++ b/sbin/runscript.sh
@@ -39,6 +39,11 @@ else
NETSERVICE=
fi
+# Check if the textdomain is non-default
+search_lang=${LC_ALL:-${LC_MESSAGES:-${LANG}}}
+[[ -f ${TEXTDOMAINDIR}/${search_lang%.*}/LC_MESSAGES/${myservice}.mo ]] \
+ && TEXTDOMAIN=${myservice}
+
# Source configuration files.
# (1) Source /etc/conf.d/${myservice} to get initscript-specific
# configuration (if it exists).