sintonia/debian/patches/postgres_fixes.diff

91 lines
3.8 KiB
Diff

Subject: Change pgsql setup scripts for debian postgres 8.4
Author: Robin Gareus <robin@gareus.org>
Last-Update: 2010-02-14
Index: campcaster/bin/postInstallStation.sh
===================================================================
--- campcaster.orig/bin/postInstallStation.sh 2010-08-26 14:51:38.000000000 +0200
+++ campcaster/bin/postInstallStation.sh 2010-08-26 14:51:40.000000000 +0200
@@ -235,22 +235,22 @@
#-------------------------------------------------------------------------------
# Install the new pg_hba.conf file
#-------------------------------------------------------------------------------
-echo "Modifying postgresql access permissions...";
-
-pg_config_dir=$postgresql_dir
-pg_config_file=pg_hba.conf
-pg_config_file_saved=pg_hba.conf.before-campcaster
-
-if [ -f $pg_config_dir/$pg_config_file ] ; then
- mv -f $pg_config_dir/$pg_config_file $pg_config_dir/$pg_config_file_saved ;
-fi
-cp $install_etc/$pg_config_file $pg_config_dir/$pg_config_file
-chown root:$postgres_user $pg_config_dir/$pg_config_file
-
-# don't use restart for the init script, as it might return prematurely
-# and in the later call to psql we wouldn't be able to connect
-${postgresql_init_script} stop
-${postgresql_init_script} start
+#echo "Modifying postgresql access permissions...";
+#
+#pg_config_dir=$postgresql_dir
+#pg_config_file=pg_hba.conf
+#pg_config_file_saved=pg_hba.conf.before-campcaster
+#
+#if [ -f $pg_config_dir/$pg_config_file ] ; then
+# mv -f $pg_config_dir/$pg_config_file $pg_config_dir/$pg_config_file_saved ;
+#fi
+#cp $install_etc/$pg_config_file $pg_config_dir/$pg_config_file
+#chown root:$postgres_user $pg_config_dir/$pg_config_file
+#
+## don't use restart for the init script, as it might return prematurely
+## and in the later call to psql we wouldn't be able to connect
+#${postgresql_init_script} stop
+#${postgresql_init_script} start
#-------------------------------------------------------------------------------
Index: campcaster/src/modules/storageServer/bin/createDatabase.sh
===================================================================
--- campcaster.orig/src/modules/storageServer/bin/createDatabase.sh 2010-08-26 14:51:38.000000000 +0200
+++ campcaster/src/modules/storageServer/bin/createDatabase.sh 2010-08-26 14:51:40.000000000 +0200
@@ -171,7 +171,7 @@
|| echo "Couldn't create database user $ls_dbuser.";
su - $postgres_user -c "echo \"CREATE DATABASE \\\"$ls_database\\\" \
- OWNER $ls_dbuser ENCODING 'utf-8';\" \
+ OWNER $ls_dbuser;\" \
| psql template1" \
|| echo "Couldn't create database $ls_database.";
else
@@ -187,7 +187,7 @@
echo " ENCRYPTED PASSWORD '$ls_dbpassword'";
echo " CREATEDB NOCREATEUSER;";
echo "CREATE DATABASE \"$ls_database\"";
- echo " OWNER $ls_dbuser ENCODING 'utf-8';";
+ echo " OWNER $ls_dbuser;";
fi
Index: campcaster/src/products/scheduler/bin/createDatabase.sh
===================================================================
--- campcaster.orig/src/products/scheduler/bin/createDatabase.sh 2010-08-26 14:51:38.000000000 +0200
+++ campcaster/src/products/scheduler/bin/createDatabase.sh 2010-08-26 14:51:40.000000000 +0200
@@ -166,7 +166,7 @@
|| echo "Couldn't create database user $dbuser.";
su - $postgres_user -c "echo \"CREATE DATABASE \\\"$database\\\" \
- OWNER $dbuser ENCODING 'utf-8';\" \
+ OWNER $dbuser;\" \
| psql template1" \
|| echo "Couldn't create database $database.";
else
@@ -182,7 +182,7 @@
echo " ENCRYPTED PASSWORD '$dbpassword'";
echo " CREATEDB NOCREATEUSER;";
echo "CREATE DATABASE \"$database\"";
- echo " OWNER $dbuser ENCODING 'utf-8';";
+ echo " OWNER $dbuser;";
fi