Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2007 19:38:24 GMT
From:      Cristian KLEIN <cristi@net.utcluj.ro>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/116934: net-mgmt/mrtg won't start in UTF-8 locales
Message-ID:  <200710041938.l94JcOB7089509@www.freebsd.org>
Resent-Message-ID: <200710041940.l94Je1uc077568@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         116934
>Category:       ports
>Synopsis:       net-mgmt/mrtg won't start in UTF-8 locales
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 04 19:40:00 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Cristian KLEIN
>Release:        FreeBSD 5.5
>Organization:
Technical University of Cluj-Napoca
>Environment:
FreeBSD hosting.c7obs.net 5.5-STABLE FreeBSD 5.5-STABLE #3: Thu Oct  4 21:51:20 EEST 2007     cristi@hosting.c7obs.net:/usr/obj/usr/src/sys/HOSTING-ROUTER  i386

>Description:
When using a UTF-8 locale, such as ro_RO.UTF-8, and starting mrtg_daemon from rc.d, the following error will display, and mrtg will refuse to start:

-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
       variable LANG is set to UTF-8. Please run mrtg in an environment
       where this is not the case. Try the following command to start:

       env LANG=C /usr/local/bin/mrtg --pid-file /var/run/mrtg/mrtg.pid --lock-file /var/run/mrtg/lockfile --confcache-file /var/run/mrtg/confcache --user mrtg --group mrtg --daemon /usr/local/etc/mrtg/mrtg.cfg 
-----------------------------------------------------------------------

>How-To-Repeat:
1) install net-mgmt/mrtg
2) in csh type:

# setenv LANG ro_RO.UTF-8
# /usr/local/etc/rc.d/mrtg_daemon.sh forcestart

>Fix:
--- files/mrtg_daemon.sh.in.orig        Sun Jul  1 11:15:00 2007
+++ files/mrtg_daemon.sh.in     Thu Oct  4 22:28:10 2007
@@ -33,5 +33,6 @@
 	rm -f /var/run/mrtg/lockfile /var/run/mrtg/confcache $mrtg_daemon_pidfile
 }
 
+export LANG=C
 run_rc_command "$1"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710041938.l94JcOB7089509>