[Fusionforge-commits] r8960 - in trunk: . gforge/debian/dsf-in

Christian Bayle cbayle at libremir.placard.fr.eu.org
Sat Mar 6 00:26:39 CET 2010


Author: cbayle
Date: 2010-03-06 00:26:39 +0100 (Sat, 06 Mar 2010)
New Revision: 8960

Modified:
   trunk/Makefile.debian
   trunk/gforge/debian/dsf-in/db-postgresql.postinst.dsfh-in
Log:
 Try to start the db if offline


Modified: trunk/Makefile.debian
===================================================================
--- trunk/Makefile.debian	2010-03-05 23:25:55 UTC (rev 8959)
+++ trunk/Makefile.debian	2010-03-05 23:26:39 UTC (rev 8960)
@@ -29,7 +29,7 @@
 UBUNTUOP=$(shell wget -q -S http://localhost/ubuntu -O /dev/null 2>&1 && echo "--mirror $(LOCALMIRROR)" || echo "--mirror http://archive.ubuntu.com/ubuntu") --debootstrap debootstrap
 DEBIANOP=--debootstrapopts --include=apt
 ASKPASS=--ask-passphrase
-ASKPASS=
+#ASKPASS=
 
 MAJOR=$(shell head -1 $(PKGDIR)/debian/changelog | sed 's/.*(\(.*\)-[^-]*).*/\1/')
 in_svn_repo:= $(wildcard .svn/) 

Modified: trunk/gforge/debian/dsf-in/db-postgresql.postinst.dsfh-in
===================================================================
--- trunk/gforge/debian/dsf-in/db-postgresql.postinst.dsfh-in	2010-03-05 23:25:55 UTC (rev 8959)
+++ trunk/gforge/debian/dsf-in/db-postgresql.postinst.dsfh-in	2010-03-05 23:26:39 UTC (rev 8960)
@@ -11,6 +11,15 @@
 	# This is probably not te most elegant way to deal with database
 	# I install or upgrade on the default cluster if it is online
 	# or I quit gently with a big message
+	for i in 1 2 3
+	do
+		pg_version_offline=`pg_lsclusters | grep 5432 | grep offline | cut -d' ' -f1`
+		if [ "x$pg_version" != "x" ]
+		then
+			invoke-rc.d postgresql-$pg_version start
+			sleep $i
+		fi
+	done
 	pg_version=`pg_lsclusters | grep 5432 | grep online | cut -d' ' -f1`
 	if [ "x$pg_version" != "x" ] 
 	then 




More information about the Fusionforge-commits mailing list