[Pkg-sysvinit-commits] r613 - sysvinit/trunk/debian/initscripts/etc/init.d

Thomas Hood jdthood-guest at costa.debian.org
Thu Jan 12 00:09:34 UTC 2006


Author: jdthood-guest
Date: 2006-01-12 00:09:33 +0000 (Thu, 12 Jan 2006)
New Revision: 613

Modified:
   sysvinit/trunk/debian/initscripts/etc/init.d/umountfs
   sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh
Log:
Reduce verbosity when VERBOSE is no

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/umountfs
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/umountfs	2006-01-12 00:00:14 UTC (rev 612)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/umountfs	2006-01-12 00:09:33 UTC (rev 613)
@@ -11,10 +11,12 @@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-umask 022
+. /lib/init/vars.sh
 
 . /lib/lsb/init-functions
 
+umask 022
+
 do_stop () {
 	# Make sure tmpfs file systems are umounted before turning off
 	# swap, to avoid running out of memory if the tmpfs filesystems
@@ -22,16 +24,17 @@
 	#
 	# Generally /dev is still in use at this point; we want to ignore
 	# the error message and error code about that.
-	log_action_begin_msg "Unmounting temporary filesystems"
+	[ "$VERBOSE" != no ] && log_action_begin_msg "Unmounting temporary filesystems"
 	umount -a -t tmpfs 9>&2 2>&1 1>&9 | grep -v '/dev: device is busy' 9>&2 2>&1 1>&9
-	log_action_end_msg 0
+	[ "$VERBOSE" != no ] && log_action_end_msg 0
 
-	log_action_begin_msg "Deactivating swap"
+	[ "$VERBOSE" != no ] && log_action_begin_msg "Deactivating swap"
 	swapoff -a >/dev/null
-	log_action_end_msg $?
+	ES=$?
+	[ "$VERBOSE" != no ] && log_action_end_msg $ES
 
 	# Umount all filesystems except root and the virtual ones
-	log_action_begin_msg "Unmounting local filesystems"
+	[ "$VERBOSE" != no ] && log_action_begin_msg "Unmounting local filesystems"
 
 	# List all mounts, deepest mount point first
 	LC_ALL=C sort -r -k 2 /proc/mounts | 
@@ -55,8 +58,9 @@
 			umount -f -r -d $DIRS
 		fi
 	)
+	ES=$?
 
-	log_action_end_msg $?
+	[ "$VERBOSE" != no ] && log_action_end_msg $ES
 }
 
 case "$1" in

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh	2006-01-12 00:00:14 UTC (rev 612)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/umountnfs.sh	2006-01-12 00:09:33 UTC (rev 613)
@@ -15,6 +15,8 @@
 KERNEL="$(uname -s)"
 RELEASE="$(uname -r)"
 
+. /lib/init/vars.sh
+
 . /lib/lsb/init-functions
 
 case "${KERNEL}:${RELEASE}" in
@@ -36,7 +38,7 @@
 	# Remove bootclean flag files (precaution against symlink attacks)
 	rm -f /tmp/.clean /var/lock/.clean /var/run/.clean
 
-	log_action_begin_msg "Unmounting remote and non-toplevel virtual filesystems"
+	[ "$VERBOSE" != no ] && log_action_begin_msg "Unmounting remote and non-toplevel virtual filesystems"
 
 	#
 	# Make list of points to unmount in reverse order of their creation
@@ -68,8 +70,9 @@
 	then
 		umount $FLAGS $DIRS
 	fi
+	ES=$?
 
-	log_action_end_msg 0
+	[ "$VERBOSE" != no ] && log_action_end_msg $ES
 }
 
 case "$1" in




More information about the Pkg-sysvinit-commits mailing list