SOURCES: mrtg.init - remove utf-8 from all locale strings
glen
glen at pld-linux.org
Fri Oct 21 14:10:41 CEST 2005
Author: glen Date: Fri Oct 21 12:10:41 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- remove utf-8 from all locale strings
---- Files affected:
SOURCES:
mrtg.init (1.12 -> 1.13)
---- Diffs:
================================================================
Index: SOURCES/mrtg.init
diff -u SOURCES/mrtg.init:1.12 SOURCES/mrtg.init:1.13
--- SOURCES/mrtg.init:1.12 Fri Oct 21 13:57:58 2005
+++ SOURCES/mrtg.init Fri Oct 21 14:10:36 2005
@@ -19,12 +19,14 @@
# Get service config
[ -f /etc/sysconfig/mrtg ] && . /etc/sysconfig/mrtg
-if [[ "$LANG" == *[Uu][Tt][Ff]-8 ]]; then
- export LANG=${LANG%.[Uu][Tt][Ff]-8}
-fi
-if [[ "$LC_ALL" == *[Uu][Tt][Ff]-8 ]]; then
- export LC_ALL=${LC_ALL%.[Uu][Tt][Ff]-8}
-fi
+# mrtg doesn't work in utf-8 locale
+for k in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES \
+ LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL; do
+ eval v=$`echo $k`
+ if [[ "$v" == *[Uu][Tt][Ff]-8 ]]; then
+ eval export $k=\${$k%.[Uu][Tt][Ff]-8}
+ fi
+done
# See how we were called.
case "$1" in
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/mrtg.init?r1=1.12&r2=1.13&f=u
More information about the pld-cvs-commit
mailing list