[Fusionforge-commits] r6989 - in trunk/gforge: . utils

Alexandre Neymann neymanna at libremir.placard.fr.eu.org
Tue Feb 17 17:40:27 CET 2009


Author: neymanna
Date: 2009-02-17 17:40:26 +0100 (Tue, 17 Feb 2009)
New Revision: 6989

Modified:
   trunk/gforge/fusionforge.spec
   trunk/gforge/utils/fusionforge-shell-postgresql.spec
Log:
moving creation of gforge_nss from fusionforge-shell-postgresql.spec to fusionforge.spec

Modified: trunk/gforge/fusionforge.spec
===================================================================
--- trunk/gforge/fusionforge.spec	2009-02-17 13:24:15 UTC (rev 6988)
+++ trunk/gforge/fusionforge.spec	2009-02-17 16:40:26 UTC (rev 6989)
@@ -234,12 +234,14 @@
 	%randstr GFORGEDATABASE_PASSWORD 8
 
 	su -l postgres -c "psql -c \"CREATE USER %{dbuser} WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
+	su -l postgres -c "psql -c \"CREATE USER gforge_nss WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
 	su -l postgres -c "psql -c \"CREATE USER gforge_mta WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
 	
 	# updating PostgreSQL configuration
 	if ! grep -i '^ *host.*%{dbname}.*' /var/lib/pgsql/data/pg_hba.conf >/dev/null 2>&1; then
 		echo 'host %{dbname} %{dbuser} 127.0.0.1 255.255.255.255 md5' >> /var/lib/pgsql/data/pg_hba.conf
  		echo 'host %{dbname} gforge_mta 127.0.0.1 255.255.255.255 trust' >> /var/lib/pgsql/data/pg_hba.conf
+		echo 'host %{dbname} gforge_nss 127.0.0.1 255.255.255.255 trust' >> /var/lib/pgsql/data/pg_hba.conf
 		%reloadpostgresql
 	fi
 

Modified: trunk/gforge/utils/fusionforge-shell-postgresql.spec
===================================================================
--- trunk/gforge/utils/fusionforge-shell-postgresql.spec	2009-02-17 13:24:15 UTC (rev 6988)
+++ trunk/gforge/utils/fusionforge-shell-postgresql.spec	2009-02-17 16:40:26 UTC (rev 6989)
@@ -68,14 +68,14 @@
 		s/^sys_account_manager_type=.*/sys_account_manager_type=pgsql/g" %{GFORGE_CONF_DIR}/gforge.conf
 
 	# creating gforge database user
-	GFORGEDATABASE_PASSWORD=$(grep ^db_password= %{GFORGE_CONF_DIR}/gforge.conf | cut -d= -f2-)
-	su -l postgres -c "psql -c \"CREATE USER gforge_nss WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
+	#GFORGEDATABASE_PASSWORD=$(grep ^db_password= %{GFORGE_CONF_DIR}/gforge.conf | cut -d= -f2-)
+	#su -l postgres -c "psql -c \"CREATE USER gforge_nss WITH PASSWORD '$GFORGEDATABASE_PASSWORD' NOCREATEUSER\" %{dbname} >/dev/null 2>&1"
 	
 	# updating PostgreSQL configuration
-	if ! grep -i '^ *host.*gforge_nss.*' /var/lib/pgsql/data/pg_hba.conf >/dev/null 2>&1; then
-		echo 'host %{dbname} gforge_nss 127.0.0.1 255.255.255.255 trust' >> /var/lib/pgsql/data/pg_hba.conf
-		%reloadpostgresql
-	fi
+	#if ! grep -i '^ *host.*gforge_nss.*' /var/lib/pgsql/data/pg_hba.conf >/dev/null 2>&1; then
+	#	echo 'host %{dbname} gforge_nss 127.0.0.1 255.255.255.255 trust' >> /var/lib/pgsql/data/pg_hba.conf
+	#	%reloadpostgresql
+	#fi
 	
 	#Configuration de libnss-pgsql
 	ln -s %{GFORGE_DIR}/utils/install-nsspgsql.sh %{SBIN_DIR}/




More information about the Fusionforge-commits mailing list