X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Fopenvswitch-monitor.init;h=62c0ac8f7c671da6fe8ccd811c3777eec69810db;hb=20aa445d66ace847aa2945b372cc8d3c0e9b034b;hp=8c7e1ad0871c9a598995c888372cc7ff41cd5cf1;hpb=064af42167bf4fc9aaea2702d80ce08074b889c0;p=openvswitch diff --git a/debian/openvswitch-monitor.init b/debian/openvswitch-monitor.init index 8c7e1ad0..62c0ac8f 100755 --- a/debian/openvswitch-monitor.init +++ b/debian/openvswitch-monitor.init @@ -24,8 +24,8 @@ # ### BEGIN INIT INFO # Provides: openvswitch-monitor -# Required-Start: $network $local_fs -# Required-Stop: +# Required-Start: $network $local_fs $remote_fs +# Required-Stop: $remote_fs # Should-Start: $named $syslog openvswitch-switch # Should-Stop: # Default-Start: 2 3 4 5 @@ -36,17 +36,17 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/ovs-monitor -NAME=openvswitch-monitor +NAME=ovs-monitor DESC="Open vSwitch switch monitor" -PIDFILE=/var/run/$NAME.pid +PIDFILE=/var/run/openvswitch/$NAME.pid test -x $DAEMON || exit 0 . /lib/lsb/init-functions # Default options, these can be overriden by the information -# at /etc/default/$NAME +# at /etc/default/openvswitch-monitor DAEMON_OPTS="" # Additional options given to the daemon DODTIME=10 # Time to wait for the daemon to die, in seconds @@ -55,8 +55,9 @@ DODTIME=10 # Time to wait for the daemon to die, in seconds # 'restart' will not work # Include defaults if available -if [ -f /etc/default/$NAME ] ; then - . /etc/default/$NAME +default=/etc/default/openvswitch-monitor +if [ -f $default ] ; then + . $default fi set -e @@ -105,7 +106,7 @@ stop_daemon() { case "$1" in start) - log_daemon_msg "Starting $DESC " "$NAME" + log_daemon_msg "Starting $DESC " "$NAME" # Check if it's running first if running ; then log_progress_msg "apparently already running" @@ -123,7 +124,7 @@ case "$1" in # a false positive (use 'status' for that) log_end_msg 1 fi - ;; + ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" if running ; then @@ -147,7 +148,7 @@ case "$1" in start_daemon running log_end_msg $? - ;; + ;; status) log_daemon_msg "Checking status of $DESC" "$NAME" if running ; then @@ -165,10 +166,10 @@ case "$1" in log_warning_msg "cannot re-read the config file (use restart)." ;; *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 - exit 1 - ;; + N=/etc/init.d/openvswitch-monitor + echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; esac exit 0