summaryrefslogtreecommitdiffstats
path: root/pg_createcluster
diff options
context:
space:
mode:
Diffstat (limited to 'pg_createcluster')
-rwxr-xr-xpg_createcluster5
1 files changed, 3 insertions, 2 deletions
diff --git a/pg_createcluster b/pg_createcluster
index 66f0b82..70d839e 100755
--- a/pg_createcluster
+++ b/pg_createcluster
@@ -4,7 +4,7 @@
# the postgresql-common infrastructure.
#
# (C) 2005-2013 Martin Pitt <mpitt@debian.org>
-# (C) 2012-2021 Christoph Berg <myon@debian.org>
+# (C) 2012-2024 Christoph Berg <myon@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ use strict;
use warnings;
use PgCommon;
use Getopt::Long;
-use POSIX qw/lchown setlocale LC_ALL LC_CTYPE/;
+use POSIX qw/lchown setlocale LC_ALL LC_NUMERIC/;
$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; # untaint
@@ -218,6 +218,7 @@ unless (setlocale (LC_ALL, "")) {
grep { /^(LC_|LANG)/ } sort keys %ENV;
error ("The locale requested by the environment is invalid:\n$env")
}
+setlocale (LC_NUMERIC, "C"); # otherwise version comparisons break
if (@ARGV < 2) {
print "Usage: $0 [options] <version> <cluster name> [-- <initdb options>]