[Popcon-commits] cvs commit to popularity-contest/debian by pere

popcon-commits@lists.alioth.debian.org popcon-commits@lists.alioth.debian.org
Mon, 26 Jan 2004 22:51:16 +0100


Update of /cvsroot/popcon/popularity-contest/debian
In directory quantz:/tmp/cvs-serv9175

Modified Files:
	postinst 
Log Message:
No need to calculate a new ID unless it is going to be written to
file.


Index: postinst
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/debian/postinst,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- postinst	26 Jan 2004 21:18:33 -0000	1.6
+++ postinst	26 Jan 2004 21:51:14 -0000	1.7
@@ -12,10 +12,6 @@
     . $conffile
 fi
 
-if [ -z "$MY_HOSTID" ]; then
-    MY_HOSTID=`dd if=/dev/urandom bs=1k count=1 2>/dev/null | md5sum|sed 's/  -//'''`
-fi
-
 # Get this setting from debconf.  It was set based on the content of
 # /etc/popularity-contest.conf in the 'config' script, so it should be
 # safe to ignore the value fetched by loading the file above.  This
@@ -28,6 +24,8 @@
 fi
 
 generate_conffile() {
+	MY_HOSTID=`dd if=/dev/urandom bs=1k count=1 2>/dev/null | md5sum | sed 's/  -//'''`
+
 	cat <<-EOF >$conffile
 		# Config file for Debian's popularity-contest package.
 		#