Changeset 1432


Ignore:
Timestamp:
Oct 29, 2008, 12:42:48 PM (15 years ago)
Author:
broder
Message:

Use a library init script in invirt-dhcp

Location:
trunk/packages/invirt-dhcp/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dhcp/debian/changelog

    r1431 r1432  
    33  * sipb-xen-dhcp -> invirt-dhcp
    44  * Remove pointless files/ tree
     5  * Use library init script
    56
    6  -- Evan Broder <broder@mit.edu>  Wed, 29 Oct 2008 04:46:19 -0400
     7 -- Evan Broder <broder@mit.edu>  Wed, 29 Oct 2008 12:41:31 -0400
    78
    89sipb-xen-dhcp (3.4) unstable; urgency=low
  • trunk/packages/invirt-dhcp/debian/invirt-dhcp.init

    r1430 r1432  
    2626[ -x "$DAEMON" ] || exit 0
    2727
    28 # Read configuration variable file if it is present
    29 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
    30 
    31 # Load the VERBOSE setting and other rcS variables
    32 . /lib/init/vars.sh
    33 
    34 # Define LSB log_* functions.
    35 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
    36 . /lib/lsb/init-functions
     28. /lib/init/std-init.sh
    3729
    3830#
     
    6759}
    6860
    69 case "$1" in
    70   start)
    71         [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    72         do_start
    73         case "$?" in
    74                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
    75                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    76         esac
    77         ;;
    78   stop)
    79         [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    80         do_stop
    81         case "$?" in
    82                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
    83                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    84         esac
    85         ;;
    86   #reload|force-reload)
    87         #
    88         # If do_reload() is not implemented then leave this commented out
    89         # and leave 'force-reload' as an alias for 'restart'.
    90         #
    91         #log_daemon_msg "Reloading $DESC" "$NAME"
    92         #do_reload
    93         #log_end_msg $?
    94         #;;
    95   restart|force-reload)
    96         #
    97         # If the "reload" option is implemented then remove the
    98         # 'force-reload' alias
    99         #
    100         log_daemon_msg "Restarting $DESC" "$NAME"
    101         do_stop
    102         case "$?" in
    103           0|1)
    104                 do_start
    105                 case "$?" in
    106                         0) log_end_msg 0 ;;
    107                         1) log_end_msg 1 ;; # Old process is still running
    108                         *) log_end_msg 1 ;; # Failed to start
    109                 esac
    110                 ;;
    111           *)
    112                 # Failed to stop
    113                 log_end_msg 1
    114                 ;;
    115         esac
    116         ;;
    117   *)
    118         #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    119         echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
    120         exit 3
    121         ;;
    122 esac
    123 
    124 :
     61std_init "$1"
Note: See TracChangeset for help on using the changeset viewer.