Changeset 1740 for trunk


Ignore:
Timestamp:
Nov 22, 2008, 5:36:20 AM (16 years ago)
Author:
broder
Message:

Punt more tabs

I bet I wrote this with tabs, too. *sigh*

Location:
trunk/packages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-console-server/debian/invirt-console-server.init

    r1446 r1740  
    5252do_start()
    5353{
    54         # Return
    55         #   0 if daemon has been started
    56         #   1 if daemon was already running
    57         #   2 if daemon could not be started
    58         modprobe fuse
    59         gen_config
    60         daemon --running -n $NAME && return 1
    61         daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
     54    # Return
     55    #   0 if daemon has been started
     56    #   1 if daemon was already running
     57    #   2 if daemon could not be started
     58    modprobe fuse
     59    gen_config
     60    daemon --running -n $NAME && return 1
     61    daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
    6262}
    6363
     
    6767do_stop()
    6868{
    69         # Return
    70         #   0 if daemon has been stopped
    71         #   1 if daemon was already stopped
    72         #   2 if daemon could not be stopped
    73         #   other if a failure occurred
    74         daemon --stop -n $NAME
    75         RETVAL="$?"
    76         [ "$RETVAL" = 2 ] && return 2
    77         # Many daemons don't delete their pidfiles when they exit.
    78         rm -f $PIDFILE
    79         umount "$DAEMON_ARGS"
    80         return "$RETVAL"
     69    # Return
     70    #   0 if daemon has been stopped
     71    #   1 if daemon was already stopped
     72    #   2 if daemon could not be stopped
     73    #   other if a failure occurred
     74    daemon --stop -n $NAME
     75    RETVAL="$?"
     76    [ "$RETVAL" = 2 ] && return 2
     77    # Many daemons don't delete their pidfiles when they exit.
     78    rm -f $PIDFILE
     79    umount "$DAEMON_ARGS"
     80    return "$RETVAL"
    8181}
    8282
    8383do_reload()
    8484{
    85         gen_config
    86         invoke-rc.d conserver-server reload
     85    gen_config
     86    invoke-rc.d conserver-server reload
    8787}
    8888
    8989case "$1" in
    9090  start)
    91         [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    92         do_start
    93         case "$?" in
    94                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
    95                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    96         esac
    97         ;;
     91    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
     92    do_start
     93    case "$?" in
     94        0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
     95        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
     96    esac
     97    ;;
    9898  stop)
    99         [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    100         do_stop
    101         case "$?" in
    102                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
    103                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    104         esac
    105         ;;
     99    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
     100    do_stop
     101    case "$?" in
     102        0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
     103        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
     104    esac
     105    ;;
    106106  reload|force-reload)
    107         log_daemon_msg "Reloading $DESC" "$NAME"
    108         do_reload
    109         log_end_msg $?
    110         ;;
     107    log_daemon_msg "Reloading $DESC" "$NAME"
     108    do_reload
     109    log_end_msg $?
     110    ;;
    111111  restart)
    112         log_daemon_msg "Restarting $DESC" "$NAME"
    113         do_stop
    114         case "$?" in
    115           0|1)
    116                 do_start
    117                 case "$?" in
    118                         0) log_end_msg 0 ;;
    119                         1) log_end_msg 1 ;; # Old process is still running
    120                         *) log_end_msg 1 ;; # Failed to start
    121                 esac
    122                 ;;
    123           *)
    124                 # Failed to stop
    125                 log_end_msg 1
    126                 ;;
    127         esac
    128         ;;
     112    log_daemon_msg "Restarting $DESC" "$NAME"
     113    do_stop
     114    case "$?" in
     115      0|1)
     116        do_start
     117        case "$?" in
     118            0) log_end_msg 0 ;;
     119            1) log_end_msg 1 ;; # Old process is still running
     120            *) log_end_msg 1 ;; # Failed to start
     121        esac
     122        ;;
     123      *)
     124        # Failed to stop
     125        log_end_msg 1
     126        ;;
     127    esac
     128    ;;
    129129  *)
    130         echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    131         exit 3
    132         ;;
     130    echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
     131    exit 3
     132    ;;
    133133esac
    134134
  • trunk/packages/invirt-remote-server/debian/invirt-remote-server.init

    r1534 r1740  
    2929do_start()
    3030{
    31         # Return
    32         #   0 if daemon has been started
    33         #   1 if daemon was already running
    34         #   2 if daemon could not be started
    35         gen_files
    36         modprobe fuse
    37         daemon --running -n $NAME && return 1
    38         daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
     31    # Return
     32    #   0 if daemon has been started
     33    #   1 if daemon was already running
     34    #   2 if daemon could not be started
     35    gen_files
     36    modprobe fuse
     37    daemon --running -n $NAME && return 1
     38    daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
    3939}
    4040
    4141do_stop()
    4242{
    43         # Return
    44         #   0 if daemon has been stopped
    45         #   1 if daemon was already stopped
    46         #   2 if daemon could not be stopped
    47         #   other if a failure occurred
    48         daemon --stop -n $NAME
    49         RETVAL="$?"
    50         [ "$RETVAL" = 2 ] && return 2
    51         # Many daemons don't delete their pidfiles when they exit.
    52         rm -f $PIDFILE
    53         umount "$DAEMON_ARGS"
    54         return "$RETVAL"
     43    # Return
     44    #   0 if daemon has been stopped
     45    #   1 if daemon was already stopped
     46    #   2 if daemon could not be stopped
     47    #   other if a failure occurred
     48    daemon --stop -n $NAME
     49    RETVAL="$?"
     50    [ "$RETVAL" = 2 ] && return 2
     51    # Many daemons don't delete their pidfiles when they exit.
     52    rm -f $PIDFILE
     53    umount "$DAEMON_ARGS"
     54    return "$RETVAL"
    5555}
    5656
Note: See TracChangeset for help on using the changeset viewer.