Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
If using a UTF-8 locale and Bash 3.2 the mrtg init script fails set LANG=C required for mrtg to run. The original issue with UTF-8 locales was fixed in bug 132652, but when using Bash 3.2 the regular expression used fails. According to the Wikipedia entry for Bash "the regular expression begins with the first non-whitespace character after =~" as of Bash 3.2. The attached patch removes the single quotes form the regular expression and thus fixing the issue. I haven't tested how this affects versions prior to 3.2.
Created an attachment (id=105248) [details] mrtg.rc.patch
Replace with a grep Fix in cvs
Thanks, the fix works. Closing bug.
better, use this: echo "$LANG" | grep -E '((^[A-Za-z0-9\_\@\-]+\.)|(^))([uU][tT][fF]-?8)$' && LANG='C' it's faster and needn't the [[ ]]-crap.