[Pkg-sysvinit-commits] r246 -
sysvinit/trunk/debian/initscripts/etc/init.d
Thomas Hood
jdthood-guest at costa.debian.org
Thu Nov 24 15:05:18 UTC 2005
Author: jdthood-guest
Date: 2005-11-24 15:05:17 +0000 (Thu, 24 Nov 2005)
New Revision: 246
Modified:
sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh
sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh
Log:
Improve messages some more
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh 2005-11-24 14:46:36 UTC (rev 245)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountall.sh 2005-11-24 15:05:17 UTC (rev 246)
@@ -11,29 +11,45 @@
# Description:
### END INIT INFO
-[ -z "$VERBOSE" ] && VERBOSE=yes
-[ -z "$TMPTIME" ] && TMPTIME=0
+[ "$TMPTIME" ] || TMPTIME=0
+[ "$VERBOSE" ] || VERBOSE=yes
+
[ -f /etc/default/rcS ] && . /etc/default/rcS
+
. /etc/init.d/bootclean.sh
. /lib/lsb/init-functions
+
do_start () {
#
# Mount local file systems in /etc/fstab.
#
- [ "$VERBOSE" != no ] && log_action_msg "Will now mount local filesystems"
-
# Accept 96 (32/mount failure + 64/some mount succeeded)
# as a valid return status from mount in mountall.sh.
# It seems to be returned when some mount points were already mounted.
- mount -av -t nonfs,nonfs4,nosmbfs,nocifs,noncp,noncpfs,nocoda,noocfs2,nogfs
- ES=$?
- if [ "$VERBOSE" != no ]; then
+ #
+
+ do_mount() { mount -av -t nonfs,nonfs4,nosmbfs,nocifs,noncp,noncpfs,nocoda,noocfs2,nogfs ; }
+
+ if [ "$VERBOSE" != no ]
+ then
+ log_action_msg "Will now mount local filesystems"
+ do_mount
+ ES=$?
if [ 96 = $ES ] || [ 0 = $ES ]; then
log_success_msg "Done mounting local filesystems."
else
log_failure_msg "Mounting local filesystems failed with error code ${ES}."
fi
+ else
+ log_action_begin_msg "Mounting local filesystems"
+ do_mount >/dev/null
+ ES=$?
+ if [ 96 = $ES ] || [ 0 = $ES ]; then
+ log_action_end_msg 0
+ else
+ log_action_end_msg 1
+ fi
fi
case `uname -s` in
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh 2005-11-24 14:46:36 UTC (rev 245)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/mountnfs.sh 2005-11-24 15:05:17 UTC (rev 246)
@@ -15,8 +15,11 @@
# this script is getting increasingly inaccurate.
### END INIT INFO
-[ -z "TMPTIME" ] && TMPTIME=0
+[ "TMPTIME" ] || TMPTIME=0
+[ "$VERBOSE" ] || VERBOSE=yes
+
[ -f /etc/default/rcS ] && . /etc/default/rcS
+
. /etc/init.d/bootclean.sh
. /lib/lsb/init-functions
@@ -88,14 +91,27 @@
fi
if [ -n "$NETFS" ]
then
- log_action_msg "Will now mount remote filesystems"
- mount -a -t$NETFS
- ES=$?
- if [ "$ES" = 0 ]
+ do_mount() { mount -a -t$NETFS ; }
+
+ if [ "$VERBOSE" != no ]
then
- log_success_msg "Done mounting remote filesystems."
+ log_action_msg "Will now mount remote filesystems"
+ do_mount
+ ES=$?
+ if [ 96 = $ES ] || [ 0 = $ES ]; then
+ log_success_msg "Done mounting remote filesystems."
+ else
+ log_failure_msg "Mounting remote filesystems failed with error code ${ES}."
+ fi
else
- log_failure_msg "Mounting remote filesystems failed with error code ${ES}."
+ log_action_begin_msg "Mounting remote filesystems"
+ do_mount >/dev/null
+ ES=$?
+ if [ 96 = $ES ] || [ 0 = $ES ]; then
+ log_action_end_msg 0
+ else
+ log_action_end_msg 1
+ fi
fi
fi
) < /etc/fstab
More information about the Pkg-sysvinit-commits
mailing list