summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--lib/Smokeping.pm5
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index cd52ae4..c070129 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+* bail out at startup with an error message if LC_ALL is set --niko
+
2007/1/15 -- released version 2.0.910
* New Presentation option Charts. Charts are based on the new 'sorter' plugins.
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 9f8c8a7..6721a1b 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -20,7 +20,10 @@ setlogsock('unix')
# make sure we do not end up with , in odd places where one would expect a '.'
# we set the environment variable so that our 'kids' get the benefit too
$ENV{LC_NUMERIC}='C';
-POSIX::setlocale(&POSIX::LC_NUMERIC,"");
+if (POSIX::setlocale(&POSIX::LC_NUMERIC,"") ne "C") {
+ die("Resetting LC_NUMERIC failed - try removing LC_ALL from the environment");
+}
+
use File::Basename;
use Smokeping::Examples;