[Fusionforge-commits] r14143 - branches/Branch_5_1/src/debian/dsf-in

Olivier Berger olberger at fusionforge.org
Thu Aug 18 07:40:00 CEST 2011


Author: olberger
Date: 2011-08-18 07:40:00 +0200 (Thu, 18 Aug 2011)
New Revision: 14143

Modified:
   branches/Branch_5_1/src/debian/dsf-in/shell-postgresql.postinst
Log:
Better handling of files which may be non-existing upon first install

Modified: branches/Branch_5_1/src/debian/dsf-in/shell-postgresql.postinst
===================================================================
--- branches/Branch_5_1/src/debian/dsf-in/shell-postgresql.postinst	2011-08-18 05:39:54 UTC (rev 14142)
+++ branches/Branch_5_1/src/debian/dsf-in/shell-postgresql.postinst	2011-08-18 05:40:00 UTC (rev 14143)
@@ -31,9 +31,27 @@
 
         # Patch NSS configuration files
 	/usr/share/@OLDPACKAGE@/bin/install-nsspgsql.sh configure-files
+
+	# There's probably no /etc/nss-pgsql.conf yet (none provided by default with libnss-pgsql2)
+	if [ ! -f /etc/nss-pgsql.conf ]; then
+	    # Install default version, identical to the one managed with ucf : ucf won't prompt us this time
+            cp /etc/nss-pgsql.conf.gforge-new /etc/nss-pgsql.conf
+        fi
 	ucf --debconf-ok /etc/nss-pgsql.conf. at OLDPACKAGE@-new /etc/nss-pgsql.conf
+	ucfr @OLDPACKAGE at -shell-postgresql /etc/nss-pgsql.conf
+
+        # There's probably no /etc/nss-pgsql.conf yet (none provided by default with libnss-pgsql2)
+	if [ ! -f /etc/nss-pgsql-root.conf ]; then
+	    # Install default version, identical to the one managed with ucf : ucf won't prompt this time
+            cp /etc/nss-pgsql-root.conf. at OLDPACKAGE@-new /etc/nss-pgsql-root.conf
+	fi
 	ucf --debconf-ok /etc/nss-pgsql-root.conf. at OLDPACKAGE@-new /etc/nss-pgsql-root.conf
+	ucfr @OLDPACKAGE at -shell-postgresql /etc/nss-pgsql-root.conf
+
+	# There should be a nsswitch.conf, so we have to manage it
 	ucf --debconf-ok /etc/nsswitch.conf. at OLDPACKAGE@-new /etc/nsswitch.conf
+	ucfr @OLDPACKAGE at -shell-postgresql /etc/nsswitch.conf
+
 	rm /etc/nss-pgsql.conf. at OLDPACKAGE@-new
 	rm /etc/nss-pgsql-root.conf. at OLDPACKAGE@-new
 	rm /etc/nsswitch.conf. at OLDPACKAGE@-new




More information about the Fusionforge-commits mailing list