[Fusionforge-commits] r14160 - branches/Branch_5_1/src/debian/dsf-helper

Olivier Berger olberger at fusionforge.org
Thu Aug 18 07:41:46 CEST 2011


Author: olberger
Date: 2011-08-18 07:41:46 +0200 (Thu, 18 Aug 2011)
New Revision: 14160

Modified:
   branches/Branch_5_1/src/debian/dsf-helper/dbpasswd-variables.config
Log:
Allow to install with dpkg -i where dependency order isn't perfect

Modified: branches/Branch_5_1/src/debian/dsf-helper/dbpasswd-variables.config
===================================================================
--- branches/Branch_5_1/src/debian/dsf-helper/dbpasswd-variables.config	2011-08-18 05:41:41 UTC (rev 14159)
+++ branches/Branch_5_1/src/debian/dsf-helper/dbpasswd-variables.config	2011-08-18 05:41:46 UTC (rev 14160)
@@ -1,11 +1,20 @@
 #- beginning of included section from dbpasswd-variables.config
 db_fget @PACKAGE@/shared/db_password seen || true
 if [ "$RET" = "false" ]; then
-    db_set @PACKAGE@/shared/db_password $(gen_random_pw)
+    pw=$(gen_random_pw)
+    if [ -e /etc/gforge/config.ini.d/debian-install-secrets.ini ]; then
+        pw=$(grep '^database_password=' /etc/gforge/config.ini.d/debian-install-secrets.ini | sed 's/database_password=//')
+        echo "Since you asked not to see all the debconf questions, I reused the" 
+	echo "password for the database that was already set in "
+	echo "/etc/gforge/config.ini.d/debian-install-secrets.ini."
+	echo "Use it if you want to have a peek at the database by hand."
+    else
+        echo "Since you asked not to see all the debconf questions, I generated a random"
+	echo "password for the database.  Use it if you want to have a peek at the"
+	echo "database by hand.  It is '$pw'."
+    fi    
+    db_set @PACKAGE@/shared/db_password $pw
     db_get @PACKAGE@/shared/db_password || true
-    echo "Since you asked not to see all the debconf questions, I generated a random"
-    echo "password for the database.  Use it if you want to have a peek at the"
-    echo "database by hand.  It is '${RET}'." ;
     db_fset @PACKAGE@/shared/db_password seen true
 fi
 




More information about the Fusionforge-commits mailing list