(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PATH spids:[31]) op: Equal rhs: {(/sbin) (Lit_Other ':') (/usr/sbin) (Lit_Other ':') (/bin) (Lit_Other ':') (/usr/bin)} spids: [31] ) ] spids: [31] ) (C {(.)} {(/lib/lsb/init-functions)}) (command.FuncDef name: report_unkillable body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-x)} {(/usr/share/apport/unkillable_shutdown)} {(Lit_Other ']')}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-e)} {(/etc/default/apport)} {(Lit_Other ']')} ) (command.Pipeline children: [ (C {(grep)} {(-q)} {(SQ <'^enabled[[:space:]]*=[[:space:]]*1'>)} {(/etc/default/apport)} ) ] negated: T ) ] ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Return return>)] spids: [16777215 96] ) ] spids: [16777215 102] ) (C {(/usr/share/apport/unkillable_shutdown)} {($ VSub_DollarName '$OMITPIDS')}) ] spids: [53] ) spids: [49 52] ) (command.FuncDef name: upstart_killed_jobs body: (command.BraceGroup children: [ (command.Pipeline children: [(C {(initctl)} {(list)}) (C {(grep)} {(SQ <stop/killed>)})] negated: F ) ] spids: [117] ) spids: [112 116] ) (command.FuncDef name: upstart_jobs body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(initctl)} {(list)}) (C {(grep)} {(-E)} {(SQ <'(start/|stop/killed)'>)}) (C {(sed)} {(-n)} {(-e)} {(DQ ('/process [0-9]/s/.*process //p'))}) ] negated: F ) ] spids: [140] ) spids: [135 139] ) (command.FuncDef name: do_stop body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OMITPIDS spids:[180]) op: Equal rhs: (word.EmptyWord) spids: [180] ) ] spids: [180] ) (command.ForEach iter_name: omitfile iter_words: [{(/run/sendsigs.omit)}] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-e)} {($ VSub_DollarName '$omitfile')} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.ForEach iter_name: pid iter_words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(cat)} {($ VSub_DollarName '$omitfile')})] ) left_token: <Left_CommandSub '$('> spids: [216 220] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OMITPIDS spids:[226]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name OMITPIDS> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {($ VSub_DollarName '$OMITPIDS') (' ')} ) spids: [228 233] ) ('-o ') ($ VSub_DollarName '$pid') ) } spids: [226] ) ] spids: [226] ) ] spids: [223 239] ) spids: [215 221] ) ] spids: [16777215 207] ) ] spids: [16777215 242] ) ] spids: [193 245] ) spids: [189 191] ) (command.ForEach iter_name: omitdir iter_words: [{(/run/sendsigs.omit.d)}] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name omitdir))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.ForEach iter_name: pidfile iter_words: [{(DQ (${ VSub_Name omitdir) (/)) (Lit_Other '*')}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_DollarName '$pidfile'))} {(Lit_Other ']')} ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) (command.ForEach iter_name: pid iter_words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(cat)} {($ VSub_DollarName '$pidfile')})] ) left_token: <Left_CommandSub '$('> spids: [330 334] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OMITPIDS spids:[340]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name OMITPIDS> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {($ VSub_DollarName '$OMITPIDS') (' ') } ) spids: [342 347] ) ('-o ') ($ VSub_DollarName '$pid') ) } spids: [340] ) ] spids: [340] ) ] spids: [337 353] ) spids: [329 335] ) ] spids: [306 356] ) spids: [296 304] ) ] spids: [16777215 288] ) ] spids: [16777215 359] ) ] spids: [270 362] ) spids: [266 268] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-x)} {(/sbin/initctl)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (command.ForEach iter_name: pid iter_words: [ { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(upstart_jobs)})]) left_token: <Left_CommandSub '$('> spids: [398 400] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OMITPIDS spids:[406]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name OMITPIDS> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {($ VSub_DollarName '$OMITPIDS') (' ')} ) spids: [408 413] ) ('-o ') ($ VSub_DollarName '$pid') ) } spids: [406] ) ] spids: [406] ) ] spids: [403 419] ) spids: [397 401] ) ] spids: [16777215 389] ) ] spids: [16777215 422] ) (C {(sync)}) (C {(log_action_begin_msg)} {(DQ ('Asking all remaining processes to terminate'))}) (C {(killall5)} {(-15)} {($ VSub_DollarName '$OMITPIDS')}) (C {(log_action_end_msg)} {(0)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:alldead spids:[476]) op: Equal rhs: {(DQ )} spids: [476] ) ] spids: [476] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OMITPIDS0 spids:[481]) op: Equal rhs: {(DQ ($ VSub_DollarName '$OMITPIDS'))} spids: [481] ) ] spids: [481] ) (command.ForEach iter_name: seq iter_words: [{(1)} {(2)} {(3)} {(4)} {(5)} {(6)} {(7)} {(8)} {(9)} {(10)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OMITPIDS spids:[517]) op: Equal rhs: {(DQ ($ VSub_DollarName '$OMITPIDS0'))} spids: [517] ) ] spids: [517] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-x)} {(/sbin/initctl)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (command.ForEach iter_name: pid iter_words: [ { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(upstart_jobs)})] ) left_token: <Left_CommandSub '$('> spids: [580 582] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OMITPIDS spids:[588]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name OMITPIDS> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonPlus arg_word: {($ VSub_DollarName '$OMITPIDS') (' ')} ) spids: [590 595] ) ('-o ') ($ VSub_DollarName '$pid') ) } spids: [588] ) ] spids: [588] ) ] spids: [585 601] ) spids: [579 583] ) ] spids: [16777215 571] ) ] spids: [16777215 604] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(killall5)} {(-18)} {($ VSub_DollarName '$OMITPIDS')}) terminator: <Op_Semi ';'> ) ] action: [(C {(Lit_Other ':')})] spids: [16777215 617] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:alldead spids:[626]) op: Equal rhs: {(1)} spids: [626] ) ] spids: [626] ) (command.ControlFlow token:<ControlFlow_Break break>) ] spids: [623 633] ) (C {(sleep)} {(1)}) ] spids: [514 642] ) spids: [492 512] ) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(upstart_killed_jobs)})] ) left_token: <Left_CommandSub '$('> spids: [685 687] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:seq spids:[697]) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$seq')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) spids: [698 703] ) } spids: [697] ) ] spids: [697] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_DollarName '$seq')} {(-ge)} {(300)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Break break>)] spids: [16777215 720] ) ] spids: [16777215 726] ) (C {(sleep)} {(1)}) ] spids: [694 736] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_DollarName '$alldead'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_action_begin_msg)} {(DQ ('Killing all remaining processes'))}) (C {(killall5)} {(-9)} {($ VSub_DollarName '$OMITPIDS')}) (C {(log_action_end_msg)} {(1)}) ] spids: [16777215 754] ) ] else_action: [ (C {(log_action_begin_msg)} {(DQ ('All processes ended within ') ($ VSub_DollarName '$seq') (' seconds'))} ) (C {(log_action_end_msg)} {(0)}) ] spids: [783 800] ) ] spids: [177] ) spids: [172 176] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list:[{(start)} {(status)}] spids:[814 817 824 16777215]) (case_arm pat_list: [{(restart)} {(reload)} {(force-reload)}] action: [ (command.SimpleCommand words: [{(echo)} {(DQ ("Error: argument '") ($ VSub_Number '$1') ("' not supported"))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] spids: [827 832 852 16777215] ) (case_arm pat_list:[{(stop)}] action:[(C {(do_stop)})] spids:[855 856 862 16777215]) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [{(echo)} {(DQ ('Usage: ') ($ VSub_Number '$0') (' start|stop'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] spids: [865 866 886 16777215] ) ] spids: [805 811 888] ) (C {(Lit_Other ':')}) ] )