(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:NETDOWN) rhs:{(yes)} spids:[31])] spids: [31] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:PATH) rhs: {(/sbin) (Lit_Other ":") (/usr/sbin) (Lit_Other ":") (/bin) (Lit_Other ":") (/usr/bin)} spids: [35] ) ] spids: [35] ) (AndOr children: [ (C {(Lit_Other "[")} {(-f)} {(/etc/default/halt)} {(Lit_Other "]")}) (C {(.)} {(/etc/default/halt)}) ] op_id: Op_DAmp ) (C {(.)} {(/lib/lsb/init-functions)}) (FuncDef name: do_stop body: (BraceGroup children: [ (If arms: [ (if_arm cond: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$INIT_HALT"))} {(Lit_Other "=")} {(DQ )} {(Lit_Other "]")} ) action: (Case to_match: {(DQ ($ VSub_Name "$HALT"))} arms: [ (case_arm pat_list: [{(Lit_Other "[") (Pp) (Lit_Other "]") (Lit_Other "*")}] action: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:INIT_HALT) rhs: {(POWEROFF)} spids: [107] ) ] spids: [107] ) spids: [100 104 111 -1] ) (case_arm pat_list: [{(Lit_Other "[") (Hh) (Lit_Other "]") (Lit_Other "*")}] action: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:INIT_HALT) rhs: {(HALT)} spids: [121] ) ] spids: [121] ) spids: [114 118 125 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:INIT_HALT) rhs: {(POWEROFF)} spids: [132] ) ] spids: [132] ) spids: [128 129 136 -1] ) ] spids: [91 97 139] ) spids: [-1 88] ) ] spids: [-1 142] ) (If arms: [ (if_arm cond: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$INIT_HALT"))} {(Lit_Other "=")} {(DQ (POWEROFF))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-x)} {(/etc/init.d/ups-monitor)} {(Lit_Other "]")}) ] op_id: Op_DAmp ) action: (C {(/etc/init.d/ups-monitor)} {(poweroff)}) spids: [-1 177] ) ] spids: [-1 185] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:hddown) rhs:{(DQ (-h))} spids:[193])] spids: [193] ) (If arms: [ (if_arm cond: (C {(grep)} {(-qs)} {(SQ <"^md.*active">)} {(/proc/mdstat)}) action: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:hddown) rhs:{(DQ )} spids:[215])] spids: [215] ) spids: [-1 212] ) ] spids: [-1 220] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:poweroff) rhs:{(DQ (-p))} spids:[228])] spids: [228] ) (If arms: [ (if_arm cond: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$INIT_HALT"))} {(Lit_Other "=")} {(DQ (HALT))} {(Lit_Other "]")} ) action: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:poweroff) rhs:{(DQ )} spids:[254])] spids: [254] ) spids: [-1 251] ) ] spids: [-1 259] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:netdown) rhs:{(DQ (-i))} spids:[271])] spids: [271] ) (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$NETDOWN"))} {(Lit_Other "=")} {(DQ (no))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:netdown) rhs:{(DQ )} spids:[297])] spids: [297] ) spids: [-1 294] ) ] spids: [-1 302] ) (C {(log_action_msg)} {(DQ ("Will now halt"))}) (C {(halt)} {(-d)} {(-f)} {($ VSub_Name "$netdown")} {($ VSub_Name "$poweroff")} {($ VSub_Name "$hddown")} ) ] spids: [69] ) spids: [64 68] ) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list:[{(start)}] action:(NoOp) spids:[337338345-1]) (case_arm pat_list: [{(restart)} {(reload)} {(force-reload)}] action: (CommandList children: [ (SimpleCommand words: [{(echo)} {(DQ ("Error: argument '") ($ VSub_Number "$1") ("' not supported"))}] redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[364])] ) (C {(exit)} {(3)}) ] ) spids: [348 353 373 -1] ) (case_arm pat_list:[{(stop)}] action:(C {(do_stop)}) spids:[376377383-1]) (case_arm pat_list: [{(Lit_Other "*")}] action: (CommandList children: [ (SimpleCommand words: [{(echo)} {(DQ ("Usage: ") ($ VSub_Number "$0") (" start|stop"))}] redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[398])] ) (C {(exit)} {(3)}) ] ) spids: [386 387 407 -1] ) ] spids: [328 334 409] ) (C {(Lit_Other ":")}) ] )