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

Thomas Hood jdthood-guest at costa.debian.org
Fri Nov 25 09:09:08 UTC 2005


Author: jdthood-guest
Date: 2005-11-25 09:09:08 +0000 (Fri, 25 Nov 2005)
New Revision: 273

Modified:
   sysvinit/trunk/debian/initscripts/etc/init.d/skeleton
Log:
Fix skeleton

Modified: sysvinit/trunk/debian/initscripts/etc/init.d/skeleton
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/skeleton	2005-11-25 09:05:22 UTC (rev 272)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/skeleton	2005-11-25 09:09:08 UTC (rev 273)
@@ -15,23 +15,22 @@
 # Please remove the "Author" lines above and replace them
 # with your own name if you copy and modify this script.
 
+# Do NOT "set -e"
+
 # PATH should only include /usr/* if it runs after the mountnfs.sh script
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 DESC="Description of the service"
 NAME=daemonexecutablename
 DAEMON=/usr/sbin/$NAME
-DAEMON_ARGS="--options touse"
+DAEMON_ARGS="--options args"
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 
 # Exit if the package is not installed
-test -x $DAEMON || exit 0
+[ -x "$DAEMON" ] || exit 0
 
 # Read configuration variable file if it is present
-#if [ -r /etc/default/$NAME ]
-#then
-#	. /etc/default/$NAME
-#fi
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
 
 #
 # Function that starts the daemon/service
@@ -42,9 +41,10 @@
 	#   0 if daemon has been started
 	#   1 if daemon was already running
 	#   2 if daemon could not be started
-	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
 	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
-		$DAEMON_ARGS
+		$DAEMON_ARGS \
 		|| return 2
 	# Add code here, if necessary, that waits for the process to be ready
 	# to handle requests from services started subsequently which depend




More information about the Pkg-sysvinit-commits mailing list