[Pkg-sysvinit-commits] r133 -
sysvinit/trunk/debian/initscripts/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Fri Nov 18 13:51:23 UTC 2005
Author: jdthood-guest
Date: 2005-11-18 13:51:23 +0000 (Fri, 18 Nov 2005)
New Revision: 133
Modified:
sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh
Log:
Use log_action_begin_msg and log_action_end_msg instead of log_begin_msg and log_end_msg; print mount message either using log_warning_msg or using log_action_cont_msg
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh 2005-11-18 13:36:33 UTC (rev 132)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh 2005-11-18 13:51:23 UTC (rev 133)
@@ -24,20 +24,24 @@
#
# Mount local file systems in /etc/fstab.
#
- [ "$VERBOSE" != no ] && log_begin_msg "Mounting local filesystems..."
- (
- # Accept 96 (32/mount failure + 64/some mount
- # succeeded) as a valid exit code from mount in
- # mountall.sh. It seem to be returned when some mount
- # points already was mounted.
- mount -av -t nonfs,nonfs4,nosmbfs,nocifs,noncp,noncpfs,nocoda,noocfs2,nogfs
- ES=$?
+ [ "$VERBOSE" != no ] && log_begin_msg "Mounting local filesystems"
+
+ # Accept 96 (32/mount failure + 64/some mount succeeded)
+ # as a valid exit code from mount in mountall.sh.
+ # It seems to be returned when some mount points were already mounted.
+ MOUNT_MESSAGES="$(mount -av -t nonfs,nonfs4,nosmbfs,nocifs,noncp,noncpfs,nocoda,noocfs2,nogfs 2>&1)"
+ ES=$?
+ MOUNT_MESSAGE_TO_PRINT="$(echo "$MOUNT_MESSAGES" | egrep -m 1 -v '(already|nothing was) mounted')"
+ if [ "$VERBOSE" = no ]; then
+ log_warning_msg $MOUNT_MESSAGE_TO_PRINT
+ else
+ log_action_cont_msg $MOUNT_MESSAGE_TO_PRINT
if [ 96 = $ES ] || [ 0 = $ES ]; then
- [ "$VERBOSE" != no ] && log_end_msg 0
+ log_end_msg 0
else
- [ "$VERBOSE" != no ] && log_end_msg 1
+ log_end_msg 1
fi
- ) 2>&1 | egrep -v '(already|nothing was) mounted'
+ fi
case `uname -s` in
*FreeBSD)
More information about the Pkg-sysvinit-commits
mailing list