SOURCES: mrtg.init - mrtg doesn't work in utf-8 locale

arekm arekm at pld-linux.org
Fri Oct 21 13:26:08 CEST 2005


Author: arekm                        Date: Fri Oct 21 11:26:07 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- mrtg doesn't work in utf-8 locale

---- Files affected:
SOURCES:
   mrtg.init (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SOURCES/mrtg.init
diff -u SOURCES/mrtg.init:1.10 SOURCES/mrtg.init:1.11
--- SOURCES/mrtg.init:1.10	Wed Aug 17 13:09:51 2005
+++ SOURCES/mrtg.init	Fri Oct 21 13:26:02 2005
@@ -19,6 +19,16 @@
 # Get service config
 [ -f /etc/sysconfig/mrtg ] && . /etc/sysconfig/mrtg
 
+if (echo "$LANG" | grep -qi "UTF-8"); then
+    LANG=$(echo "$LANG" | sed -i -e 's#\.UTF-8#g')
+    export LANG
+fi
+if (echo "$LC_ALL" | grep -qi "UTF-8"); then
+    LC_ALL=$(echo "$LC_ALL" | sed -i -e 's#\.UTF-8#g')
+    export LC_ALL
+fi
+    
+
 # See how we were called.
 case "$1" in
   start)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/mrtg.init?r1=1.10&r2=1.11&f=u




More information about the pld-cvs-commit mailing list