Author: romke                        Date: Sat Jul 23 13:30:49 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- what about NOT using UNICODE as initdb encoding? (hardcoded -E UNICODE)
  changes supporting sysconfig PG_INITDB_ENCODING to alter initdb encoding.

---- Files affected:
SOURCES:
   postgresql.init (1.64 -> 1.65) , postgresql.sysconfig (1.19 -> 1.20) 

---- Diffs:

================================================================
Index: SOURCES/postgresql.init
diff -u SOURCES/postgresql.init:1.64 SOURCES/postgresql.init:1.65
--- SOURCES/postgresql.init:1.64        Fri May 13 10:09:00 2005
+++ SOURCES/postgresql.init     Sat Jul 23 15:30:44 2005
@@ -18,6 +18,9 @@
 # Get network config
 . /etc/sysconfig/network
 
+# Preconfigure some variables:
+PG_INITDB_ENCODING=UNICODE
+
 # Get service config
 if [ -f /etc/sysconfig/postgresql ]; then
        . /etc/sysconfig/postgresql
@@ -216,7 +219,12 @@
                        mkdir -p $pgdir
                        chmod 700 $pgdir
                        chown postgres:postgres $pgdir
-                       TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E 
UNICODE -D $pgdir"
+                       if [ "x${PG_INITDB_ENCODING}x" != "xx" ]; then
+                               TMPENC="-E ${PG_INITDB_ENCODING}"
+                       else
+                               TMPENC=
+                       fi
+                       TMPDIR=/tmp su postgres -s /bin/sh -c "initdb ${TMPENC} 
-D $pgdir"
                fi
        done
        echo $(nls "REMEMBER to setup password for user \"postgres\"")'!'

================================================================
Index: SOURCES/postgresql.sysconfig
diff -u SOURCES/postgresql.sysconfig:1.19 SOURCES/postgresql.sysconfig:1.20
--- SOURCES/postgresql.sysconfig:1.19   Wed Apr  6 00:24:33 2005
+++ SOURCES/postgresql.sysconfig        Sat Jul 23 15:30:44 2005
@@ -6,6 +6,11 @@
 # you should change TCP/IP port, at least.
 #
 
+# if you want change default initdb encoding use (value WITHOUT QUOTES!):
+# PG_INITDB_ENCODING=UNICODE
+# e.g. if you want use database default encoding use:
+# PG_INITDB_ENCODING=
+
 # standard setting
 PG_DB_CLUSTERS="/var/lib/pgsql"
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/postgresql.init?r1=1.64&r2=1.65&f=u
    http://cvs.pld-linux.org/SOURCES/postgresql.sysconfig?r1=1.19&r2=1.20&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to