[Fusionforge-commits] r14153 - branches/Branch_5_1/src/debian/dsf-in
Olivier Berger
olberger at fusionforge.org
Thu Aug 18 07:41:03 CEST 2011
Author: olberger
Date: 2011-08-18 07:41:02 +0200 (Thu, 18 Aug 2011)
New Revision: 14153
Modified:
branches/Branch_5_1/src/debian/dsf-in/common.postinst
Log:
Make sure shared/db_password is set before accessing it
Modified: branches/Branch_5_1/src/debian/dsf-in/common.postinst
===================================================================
--- branches/Branch_5_1/src/debian/dsf-in/common.postinst 2011-08-18 05:40:56 UTC (rev 14152)
+++ branches/Branch_5_1/src/debian/dsf-in/common.postinst 2011-08-18 05:41:02 UTC (rev 14153)
@@ -58,8 +58,13 @@
fi
if [ ! -e /etc/gforge/config.ini.d/debian-install-secrets.ini ] ; then
t=$(mktemp /etc/gforge/config.ini.d/debian-install-secrets.ini.XXXXXX)
- db_get @PACKAGE@/shared/db_password || true
- pw=$RET
+ pw=
+ db_fget @PACKAGE@/shared/db_password seen || true
+ seen="$RET"
+ if [ "$seen" = "true" ]; then
+ db_get @PACKAGE@/shared/db_password || true
+ pw=$RET
+ fi
if [ "$pw" = "" ] ; then
if [ -c /dev/urandom ]; then # ...using /dev/urandom when possible
pw=$(dd if=/dev/urandom count=1 bs=16 2> /dev/null | md5sum | cut -c-32)
More information about the Fusionforge-commits
mailing list