[Pkg-sysvinit-commits] r513 - in sysvinit/trunk/debian: . initscripts

Thomas Hood jdthood-guest at costa.debian.org
Tue Jan 3 20:03:20 UTC 2006


Author: jdthood-guest
Date: 2006-01-03 20:03:19 +0000 (Tue, 03 Jan 2006)
New Revision: 513

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/postinst
Log:
Regenerate /etc/default/rcS in postinst so that comments are up to date

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-01-03 19:51:21 UTC (rev 512)
+++ sysvinit/trunk/debian/changelog	2006-01-03 20:03:19 UTC (rev 513)
@@ -27,6 +27,8 @@
     systems when they upgraded to buzz
   * initscripts postinst: Remove obsolete GMT-to-UTC code: this
     conversion was performed when systems were upgraded to potato
+  * initscripts postinst: Regenerate /etc/default/rcS so that comments
+    are up to date
   * Add Replaces to Conflicts: mdutils which no longer exists even in
     oldstable
   * sysvinit: Depend on libc6 rather than Pre-Depending on it; we don't

Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst	2006-01-03 19:51:21 UTC (rev 512)
+++ sysvinit/trunk/debian/initscripts/postinst	2006-01-03 20:03:19 UTC (rev 513)
@@ -71,9 +71,28 @@
 if [ ! -f /etc/default/rcS ]
 then
 	#
-	# Install sample rcS file.
+	# Install default rcS default file.
 	#
 	cp -p /usr/share/initscripts/default.rcS /etc/default/rcS
+else
+	#
+	# Generate rcS default file from default rcS default file
+	# using current value set for each variable
+	#
+	(
+		. /usr/share/initscripts/default.rcS >/dev/null 2>&1
+		. /etc/default/rcS >/dev/null 2>&1
+		sed \
+			-e "s/^[[:space:]]*TMPTIME[[:space:]]*=.*/TMPTIME=$TMPTIME/" \
+			-e "s/^[[:space:]]*SULOGIN[[:space:]]*=.*/SULOGIN=$SULOGIN/" \
+			-e "s/^[[:space:]]*DELAYLOGIN[[:space:]]*=.*/DELAYLOGIN=$DELAYLOGIN/" \
+			-e "s/^[[:space:]]*UTC[[:space:]]*=.*/UTC=$UTC/" \
+			-e "s/^[[:space:]]*VERBOSE[[:space:]]*=.*/VERBOSE=$VERBOSE/" \
+			-e "s/^[[:space:]]*EDITMOTD[[:space:]]*=.*/EDITMOTD=$EDITMOTD/" \
+			-e "s/^[[:space:]]*FSCKFIX[[:space:]]*=.*/FSCKFIX=$FSCKFIX/" \
+			< /usr/share/initscripts/default.rcS \
+			> /etc/default/rcS
+	)
 fi
 
 #




More information about the Pkg-sysvinit-commits mailing list