From: Evan Broder Date: Wed, 29 Oct 2008 16:42:48 +0000 (-0400) Subject: Use a library init script in invirt-dhcp X-Git-Tag: 0.0.1^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dhcp.git/commitdiff_plain/refs/tags/0.0.1?ds=sidebyside Use a library init script in invirt-dhcp svn path=/trunk/packages/invirt-dhcp/; revision=1432 --- diff --git a/debian/changelog b/debian/changelog index be7edbd..935f8c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ invirt-dhcp (0.0.1) unstable; urgency=low * sipb-xen-dhcp -> invirt-dhcp * Remove pointless files/ tree + * Use library init script - -- Evan Broder Wed, 29 Oct 2008 04:46:19 -0400 + -- Evan Broder Wed, 29 Oct 2008 12:41:31 -0400 sipb-xen-dhcp (3.4) unstable; urgency=low diff --git a/debian/invirt-dhcp.init b/debian/invirt-dhcp.init index 265e97d..e85f0eb 100644 --- a/debian/invirt-dhcp.init +++ b/debian/invirt-dhcp.init @@ -25,15 +25,7 @@ SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions +. /lib/init/std-init.sh # # Function that starts the daemon/service @@ -66,59 +58,4 @@ do_stop() return "$RETVAL" } -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: +std_init "$1"