[Fusionforge-commits] r10218 - trunk/src/debian/dsf-in

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Jul 9 14:48:14 CEST 2010


Author: lolando
Date: 2010-07-09 14:48:14 +0200 (Fri, 09 Jul 2010)
New Revision: 10218

Modified:
   trunk/src/debian/dsf-in/common.postinst
Log:
Fixed generation of random password

Modified: trunk/src/debian/dsf-in/common.postinst
===================================================================
--- trunk/src/debian/dsf-in/common.postinst	2010-07-08 18:44:20 UTC (rev 10217)
+++ trunk/src/debian/dsf-in/common.postinst	2010-07-09 12:48:14 UTC (rev 10218)
@@ -47,9 +47,9 @@
 	    if [ ! -e /etc/gforge/config.ini.d/debian-install-secrets.ini ] ; then
 		t=$(mktemp /etc/gforge/config.ini.d/debian-install-secrets.ini.XXXXXX)
 		if [ -c /dev/urandom ]; then  # ...using /dev/urandom when possible
-		    pw=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null | md5sum)
+		    pw=$(dd if=/dev/urandom count=256 bs=1 2> /dev/null | md5sum | cut -c-32
 		else		# ...or something else if need be.
-		    pw=$(date +"%s:%N" | md5sum)
+		    pw=$(date +"%s:%N" | md5sum | cut -c-32)
 		fi
 
 		cat > $t <<EOF




More information about the Fusionforge-commits mailing list