r162 - multipath-tools/trunk/debian

Bastian Blank waldi at costa.debian.org
Mon Sep 19 13:22:01 UTC 2005


Author: waldi
Date: Mon Sep 19 13:22:00 2005
New Revision: 162

Added:
   multipath-tools/trunk/debian/multipath-tools.multipath-tools-boot.init   (contents, props changed)
Modified:
   multipath-tools/trunk/debian/multipath-tools.init   (contents, props changed)
Log:
* debian/multipath-tools.multipath-tools-boot.init: Add. Only starts multipath.
* debian/multipath-tools.init: Update.


Modified: multipath-tools/trunk/debian/multipath-tools.init
==============================================================================
--- multipath-tools/trunk/debian/multipath-tools.init	(original)
+++ multipath-tools/trunk/debian/multipath-tools.init	Mon Sep 19 13:22:00 2005
@@ -1,34 +1,45 @@
-#!/bin/sh
+#! /bin/sh
 
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/sbin/multipathd
-NAME=multipath-tools
-DESC="multipath daemon"
+NAME=multipathd
+DESC=multipath-tools
 
 test -x $DAEMON || exit 0
 
+if [ -f /etc/default/multipath-tools ] ; then
+	. /etc/default/multipath-tools
+fi
+
+set -e
+
 case "$1" in
   start)
 	echo -n "Starting $DESC: "
-	start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS
+	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
 	echo "$NAME."
 	;;
   stop)
 	echo -n "Stopping $DESC: "
-	start-stop-daemon --stop --quiet --pidfile /var/run/multipathd.pid --exec $DAEMON
+	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
 	echo "$NAME."
 	;;
+  reload|force-reload)
+	echo "Reloading $DESC."
+	start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
+	;;
   restart|force-reload)
 	echo -n "Restarting $DESC: "
-	start-stop-daemon --stop --quiet --pidfile /var/run/multipathd.pid --exec $DAEMON
+	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON
 	sleep 1
-	start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS
+	start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
 	echo "$NAME."
 	;;
   *)
 	N=/etc/init.d/$NAME
-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
 	exit 1
+	;;
 esac
 
 exit 0

Added: multipath-tools/trunk/debian/multipath-tools.multipath-tools-boot.init
==============================================================================
--- (empty file)
+++ multipath-tools/trunk/debian/multipath-tools.multipath-tools-boot.init	Mon Sep 19 13:22:00 2005
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/sbin/multipath
+NAME=multipath
+DESC=multipath-tools
+
+test -x $DAEMON || exit 0
+
+if [ -f /etc/default/multipath-tools ] ; then
+	. /etc/default/multipath-tools
+fi
+
+set -e
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC"
+	$DAEMON -v 0
+	echo "."
+	;;
+  stop)
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	$DAEMON -v 0
+	echo "."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0



More information about the pkg-lvm-commits mailing list