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

Petter Reinholdtsen pere at costa.debian.org
Sat Mar 4 15:27:29 UTC 2006


Author: pere
Date: 2006-03-04 15:27:28 +0000 (Sat, 04 Mar 2006)
New Revision: 758

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/initscripts/etc/init.d/skeleton
Log:
  * /etc/init.d/skeleton: Show how to use the VERBOSE variable.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2006-03-04 15:20:26 UTC (rev 757)
+++ sysvinit/trunk/debian/changelog	2006-03-04 15:27:28 UTC (rev 758)
@@ -12,6 +12,7 @@
 
   [ Petter Reinholdtsen ]
   * Silence init.d/hostname.sh when VERBOSE=no.
+  * /etc/init.d/skeleton: Show how to use the VERBOSE variable.
 
  -- Thomas Hood <jdthood at yahoo.co.uk>  Mon, 13 Feb 2006 08:42:44 +0100
 

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/skeleton
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/skeleton	2006-03-04 15:20:26 UTC (rev 757)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/skeleton	2006-03-04 15:27:28 UTC (rev 758)
@@ -32,6 +32,9 @@
 # Read configuration variable file if it is present
 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
 
+# Load the VERBOSE setting and other rcS variables
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
 # Define LSB log_* functions.
 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
 . /lib/lsb/init-functions
@@ -96,19 +99,19 @@
 
 case "$1" in
   start)
-	log_daemon_msg "Starting $DESC" "$NAME"
+	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
 	do_start
 	case "$?" in
-		0|1) log_end_msg 0 ;;
-		2) log_end_msg 1 ;;
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
 	esac
 	;;
   stop)
-	log_daemon_msg "Stopping $DESC" "$NAME"
+	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
 	do_stop
 	case "$?" in
-		0|1) log_end_msg 0 ;;
-		2) log_end_msg 1 ;;
+		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
 	esac
 	;;
   #reload|force-reload)




More information about the Pkg-sysvinit-commits mailing list