#! /bin/sh ### BEGIN INIT INFO # Provides: reboot # Required-Start: # Required-Stop: # Default-Start: # Default-Stop: 6 # Short-Description: Execute the reboot command. # Description: ### END INIT INFO global PATH := '/sbin:/usr/sbin:/bin:/usr/bin' source /lib/lsb/init-functions proc do_stop { # Message should end with a newline since kFreeBSD may # print more stuff (see #323749) log_action_msg "Will now restart" reboot -d -f -i } matchstr $1 { start { # No-op } restart|reload|force-reload { echo "Error: argument '$1' not supported" > !2 exit 3 } stop { do_stop } status { exit 0 } * { echo "Usage: $0 start|stop" > !2 exit 3 } } (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PATH) op: Equal rhs: {(/sbin) (Lit_Other ":") (/usr/sbin) (Lit_Other ":") (/bin) (Lit_Other ":") (/usr/bin)} spids: [31] ) ] spids: [31] ) (C {(.)} {(/lib/lsb/init-functions)}) (FuncDef name: do_stop body: (BraceGroup children: [ (C {(log_action_msg)} {(DQ ("Will now restart"))}) (C {(reboot)} {(-d)} {(-f)} {(-i)}) ] spids: [51] ) spids: [46 50] ) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list:[{(start)}] spids:[899097-1]) (case_arm pat_list: [{(restart)} {(reload)} {(force-reload)}] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Error: argument '") ($ VSub_Number "$1") ("' not supported"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[116])] ) (C {(exit)} {(3)}) ] spids: [100 105 125 -1] ) (case_arm pat_list:[{(stop)}] action:[(C {(do_stop)})] spids:[128129135-1]) (case_arm pat_list:[{(status)}] action:[(C {(exit)} {(0)})] spids:[138139147-1]) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Usage: ") ($ VSub_Number "$0") (" start|stop"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[162])] ) (C {(exit)} {(3)}) ] spids: [150 151 171 -1] ) ] spids: [80 86 173] ) ] )