[Pkg-sysvinit-commits] r309 - in sysvinit/trunk/debian: . initscripts initscripts/etc/init.d

Thomas Hood jdthood-guest at costa.debian.org
Mon Nov 28 14:56:03 UTC 2005


Author: jdthood-guest
Date: 2005-11-28 14:56:00 +0000 (Mon, 28 Nov 2005)
New Revision: 309

Added:
   sysvinit/trunk/debian/initscripts/etc/init.d/mountall-bootclean.sh
   sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs-bootclean.sh
Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh
   sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh
   sysvinit/trunk/debian/initscripts/postinst
Log:
Implement #286479

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2005-11-28 12:16:50 UTC (rev 308)
+++ sysvinit/trunk/debian/changelog	2005-11-28 14:56:00 UTC (rev 309)
@@ -24,6 +24,8 @@
     try to please selinux  (Closes: #333836)
   * checkroot.sh: Only run findfs for mount on /  (Closes: #275680)
     Thanks to Cameron Hutchison for the patch
+  * mountall.sh, mountnfs.sh: Split call to bootclean out into separate
+    script called at the next sequence number  (Closes: #286479)
   * bootmisc.sh: Shorten motd header  (Closes: #340017)
   * bootmisc.sh: Rotate dmesg log with savelog (Closes: #237074)
   * Replace /etc/rc1.d/20single by /etc/rc1.d/S30killprocs and

Added: sysvinit/trunk/debian/initscripts/etc/init.d/mountall-bootclean.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountall-bootclean.sh	2005-11-28 12:16:50 UTC (rev 308)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountall-bootclean.sh	2005-11-28 14:56:00 UTC (rev 309)
@@ -0,0 +1,36 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          mountall-bootclean
+# Required-Start:    mountall
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+# Short-Description: bootclean after mountall
+# Description:
+### END INIT INFO
+
+NAME=mountall-bootclean
+. /lib/init/vars.sh
+
+. /etc/init.d/bootclean.sh
+. /lib/lsb/init-functions
+
+case "$1" in
+  start|"")
+	# Clean /tmp, /var/lock, /var/run
+	bootclean
+	;;
+  restart|reload|force-reload)
+	echo "Error: argument '$1' not supported" >&2
+	exit 3
+	;;
+  stop)
+	# No-op
+	;;
+  *)
+	echo "Usage: mountall-bootclean.sh [start|stop]" >&2
+	exit 3
+	;;
+esac
+
+:


Property changes on: sysvinit/trunk/debian/initscripts/etc/init.d/mountall-bootclean.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh	2005-11-28 12:16:50 UTC (rev 308)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh	2005-11-28 14:56:00 UTC (rev 309)
@@ -14,10 +14,9 @@
 [ "$TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
-. /etc/init.d/bootclean.sh
 . /lib/lsb/init-functions
 
-do_mount() {
+do_start() {
 	#
 	# Mount local file systems in /etc/fstab.
 	#
@@ -94,12 +93,6 @@
 	fi
 }
 
-do_start() {
-	do_mount
-	# Clean /tmp, /var/lock, /var/run
-	bootclean
-}
-
 case "$1" in
   start|"")
 	do_start

Added: sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs-bootclean.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs-bootclean.sh	2005-11-28 12:16:50 UTC (rev 308)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs-bootclean.sh	2005-11-28 14:56:00 UTC (rev 309)
@@ -0,0 +1,36 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          mountnfs-bootclean
+# Required-Start:    mountnfs
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+# Short-Description: bootclean after mountnfs
+# Description:
+### END INIT INFO
+
+NAME=mountnfs-bootclean
+. /lib/init/vars.sh
+
+. /etc/init.d/bootclean.sh
+. /lib/lsb/init-functions
+
+case "$1" in
+  start|"")
+	# Clean /tmp, /var/lock, /var/run
+	bootclean
+	;;
+  restart|reload|force-reload)
+	echo "Error: argument '$1' not supported" >&2
+	exit 3
+	;;
+  stop)
+	# No-op
+	;;
+  *)
+	echo "Usage: mountnfs-bootclean.sh [start|stop]" >&2
+	exit 3
+	;;
+esac
+
+:


Property changes on: sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs-bootclean.sh
___________________________________________________________________
Name: svn:executable
   + *

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh	2005-11-28 12:16:50 UTC (rev 308)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh	2005-11-28 14:56:00 UTC (rev 309)
@@ -18,13 +18,10 @@
 [ "TMPTIME" ] || TMPTIME=0
 . /lib/init/vars.sh
 
-. /etc/init.d/bootclean.sh
 . /lib/lsb/init-functions
 
-# Return 0 if something mounted
-# Return 1 if nothing mounted
-do_mount() {
-	[ -f /etc/fstab ] || return 1
+do_start() {
+	[ -f /etc/fstab ] || return
 	#
 	# Run in a subshell because of I/O redirection.
 	#
@@ -121,17 +118,10 @@
 					log_action_end_msg 1
 				fi
 			fi
-			exit 0 # From subshell!
-		else
-			exit 1 # From subshell!
 		fi
 	) < /etc/fstab
 }
 
-do_start() {
-	# Only bootclean again if we mounted something
-	do_mount && bootclean
-}
 
 case "$1" in
   start|"")

Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst	2005-11-28 12:16:50 UTC (rev 308)
+++ sysvinit/trunk/debian/initscripts/postinst	2005-11-28 14:56:00 UTC (rev 309)
@@ -19,11 +19,11 @@
 
 
 #
-#	Function like update-rc.d but simpler & faster.
-#	Usage: updatercd basename start|stop NN runlevel .
+# Function like update-rc.d but simpler & faster.
+# Usage: updatercd basename start|stop NN runlevel .
 #
-#	Heuristic: use the real update-rc.d if file-rc is detected,
-#	or if the /etc/rc2.d directory is not present.
+# Heuristic: use the real update-rc.d if file-rc is detected,
+# or if the /etc/rc2.d directory is not present.
 #
 updatercd() {
 
@@ -77,12 +77,12 @@
 if [ ! -f /etc/default/rcS ]
 then
 	#
-	#	Install sample rcS file.
+	# Install sample rcS file.
 	#
-	cp /usr/share/initscripts/default.rcS /etc/default/rcS
+	cp -p /usr/share/initscripts/default.rcS /etc/default/rcS
 else
 	#
-	#	Change GMT=-u to UTC=yes etc in existing rcS file.
+	# Change GMT=-u to UTC=yes etc in existing rcS file.
 	#
 	if grep -q ^GMT /etc/default/rcS
 	then
@@ -99,7 +99,7 @@
 fi
 
 #
-#	See if there were saved variables.
+# See if there were saved variables.
 #
 if [ -f /etc/default/rcS.sed ]
 then
@@ -113,9 +113,9 @@
 fi
 
 #
-#	Defaults for 2.85-16 and up for mountvirtfs levels changed,
-#	so remove the existing startup links if we upgraded from
-#	an older version.
+# Defaults for 2.85-16 and up for mountvirtfs levels changed,
+# so remove the existing startup links if we upgraded from
+# an older version.
 #
 case "$oldver" in
 	2.85-1[0-5])
@@ -124,39 +124,50 @@
 esac
 
 #
-#	Okay, we could do this with update-rc.d, but that would probably
-#	be pretty slow. This way we win some speed.
-#	DO NOT FOLLOW THIS EXAMPLE IN OTHER PACKAGES.
+# In 2.86.ds1-7 the "single" script was moved
 #
-updatercd mountvirtfs	start 2 S . start 36 S .
-updatercd bootlogd	start 5 S .
-updatercd checkroot.sh	start 10 S .
-updatercd modutils	start 20 S .
-updatercd checkfs.sh	start 30 S .
-updatercd mountall.sh	start 35 S .
-updatercd hostname.sh	start 40 S .
-updatercd network	start 40 S .
-updatercd mountnfs.sh	start 45 S .
-updatercd bootmisc.sh	start 55 S .
-updatercd urandom	start 55 S . start 30 0 6 .
+if dpkg --compare-versions "$oldver" lt "2.86.ds1-7"
+then
+	update-rc.d -f single remove >/dev/null 2>&1 ||:
+fi
 
 #
-#	Links in "normal" runlevels.
+# Okay, we could do this with update-rc.d, but that would probably
+# be pretty slow. This way we win some speed.
+# DO NOT FOLLOW THIS EXAMPLE IN OTHER PACKAGES.
 #
-updatercd sendsigs	start 20 0 6 .
-updatercd umountnfs.sh	start 31 0 6 .
-updatercd umountfs	start 40 0 6 .
-updatercd umountroot	start 60 0 6 .
-updatercd halt		start 90 0 .
-updatercd reboot	start 90 6 .
+# Links in runlevel S
+#
+updatercd mountvirtfs            start 2 S . start 36 S .
+updatercd bootlogd               start 5 S .
+updatercd checkroot.sh           start 10 S .
+updatercd modutils               start 20 S .
+updatercd checkfs.sh             start 30 S .
+updatercd mountall.sh            start 35 S .
+updatercd mountall-bootclean.sh  start 36 S .
+updatercd hostname.sh            start 40 S .
+updatercd network                start 40 S .
+updatercd mountnfs.sh            start 45 S .
+updatercd mountnfs-bootclean.sh  start 46 S .
+updatercd bootmisc.sh            start 55 S .
+updatercd urandom                start 55 S . start 30 0 6 .
+#
+# Links in runlevels other than S
+#
+updatercd sendsigs      start 20 0 6 .
+updatercd umountnfs.sh  start 31 0 6 .
+updatercd umountfs      start 40 0 6 .
+updatercd umountroot    start 60 0 6 .
+updatercd halt          start 90 0 .
+updatercd reboot        start 90 6 .
 updatercd killprocs     start 30 1 .
 updatercd single        start 90 1 .
-updatercd rmnologin	start 99 2 3 4 5 .
-updatercd stop-bootlogd	start 99 2 3 4 5 .
+updatercd rmnologin     start 99 2 3 4 5 .
+updatercd stop-bootlogd start 99 2 3 4 5 .
 
 #
-#	Remove scripts that were left behind by older glibc (<< 2.3.2.ds1-12)
-#	versions. We have the same functionality in mountvirtfs.
+# Remove scripts that were left behind by older glibc (<< 2.3.2.ds1-12)
+# versions. We have the same functionality in mountvirtfs.
 #
 for i in devpts.sh mountkernfs
 do
@@ -171,10 +182,10 @@
 if [ `uname -s` = Linux ]
 then
 	#
-	#	Only create /dev/{pts,shm} if /dev is on the
-	#	root file system. If some package has mounted a
-	#	seperate /dev (ramfs from udev, devfs) it is
-	#	responsible for the presence of those subdirs.
+	# Only create /dev/{pts,shm} if /dev is on the
+	# root file system. If some package has mounted a
+	# seperate /dev (ramfs from udev, devfs) it is
+	# responsible for the presence of those subdirs.
 	#
 	if ! mountpoint -q /dev
 	then
@@ -196,7 +207,7 @@
 # Create initial fsck log files
 for F in /var/log/fsck/checkroot /var/log/fsck/checkfs ; do
 	if [ ! -f "$F" ] ; then
-		echo "(nothing has been logged yet)" > "$F"
+		echo "(Nothing has been logged yet.)" > "$F"
 		chown root:adm "$F"
 		chmod 0640 "$F"
 	fi




More information about the Pkg-sysvinit-commits mailing list