(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH) op: assign_op.Equal rhs: {<'/sbin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> <'/usr/bin'> } spids: [31] ) ] ) (C {<.>} {<'/lib/lsb/init-functions'>}) (command.ShFunction name: report_unkillable body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/share/apport/unkillable_shutdown'>} {<Id.Lit_RBracket ']'>} ) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} {<'/etc/default/apport'>} {<Id.Lit_RBracket ']'>} ) (command.Pipeline children: [ (C {<grep>} {<-q>} {(SQ <'^enabled[[:space:]]*=[[:space:]]*1'>)} {<'/etc/default/apport'>} ) ] negated: T ) ] ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Return return>)] spids: [69 96] ) ] ) (C {<'/usr/share/apport/unkillable_shutdown'>} {($ Id.VSub_DollarName '$OMITPIDS')}) ] ) ) (command.ShFunction name: upstart_killed_jobs body: (BraceGroup children: [ (command.Pipeline children: [(C {<initctl>} {<list>}) (C {<grep>} {(SQ <'stop/killed'>)})] negated: F ) ] ) ) (command.ShFunction name: upstart_jobs body: (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 ) ] ) ) (command.ShFunction name: do_stop body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OMITPIDS) op: assign_op.Equal rhs: (word.Empty) 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 {<Id.Lit_LBracket '['>} {<-e>} {($ Id.VSub_DollarName '$omitfile')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ForEach iter_name: pid iter_words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cat>} {($ Id.VSub_DollarName '$omitfile')}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OMITPIDS) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name OMITPIDS> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {($ Id.VSub_DollarName '$OMITPIDS') <' '>} ) ) <'-o '> ($ Id.VSub_DollarName '$pid') ) } spids: [226] ) ] ) ] ) ) ] spids: [196 207] ) ] ) ] ) ) (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 {<Id.Lit_LBracket '['>} {<-d>} {(DQ (${ Id.VSub_Name omitdir))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ForEach iter_name: pidfile iter_words: [{(DQ (${ Id.VSub_Name omitdir) <'/'>) <Id.Lit_Star '*'>}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$pidfile'))} {<Id.Lit_RBracket ']'>} ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] ) (command.ForEach iter_name: pid iter_words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cat>} {($ Id.VSub_DollarName '$pidfile')}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OMITPIDS) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name OMITPIDS> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {($ Id.VSub_DollarName '$OMITPIDS') <' '> } ) ) <'-o '> ($ Id.VSub_DollarName '$pid') ) } spids: [340] ) ] ) ] ) ) ] ) ) ] spids: [273 288] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-x>} {<'/sbin/initctl'>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [ (command.ForEach iter_name: pid iter_words: [ {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<upstart_jobs>}))} ] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OMITPIDS) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name OMITPIDS> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {($ Id.VSub_DollarName '$OMITPIDS') <' '>} ) ) <'-o '> ($ Id.VSub_DollarName '$pid') ) } spids: [406] ) ] ) ] ) ) ] spids: [378 389] ) ] ) (C {<sync>}) (C {<log_action_begin_msg>} {(DQ <'Asking all remaining processes to terminate'>)}) (C {<killall5>} {<-15>} {($ Id.VSub_DollarName '$OMITPIDS')}) (C {<log_action_end_msg>} {<0>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:alldead) op: assign_op.Equal rhs: {(DQ )} spids: [476] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OMITPIDS0) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OMITPIDS'))} 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OMITPIDS) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OMITPIDS0'))} spids: [517] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-x>} {<'/sbin/initctl'>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ForEach iter_name: pid iter_words: [ { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<upstart_jobs>}) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OMITPIDS) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name OMITPIDS> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {($ Id.VSub_DollarName '$OMITPIDS') <' '>} ) ) <'-o '> ($ Id.VSub_DollarName '$pid') ) } spids: [588] ) ] ) ] ) ) ] spids: [560 571] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<killall5>} {<-18>} {($ Id.VSub_DollarName '$OMITPIDS')}) terminator: <Id.Op_Semi _> ) ] action: [(C {<Id.Lit_Colon ':'>})] spids: [607 617] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:alldead) op: assign_op.Equal rhs: {<1>} spids: [626] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] ) (C {<sleep>} {<1>}) ] ) ) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<upstart_killed_jobs>}) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:seq) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: {($ Id.VSub_DollarName '$seq')} right: {<Id.Lit_Digits 1>} ) ) } spids: [697] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$seq')} {<-ge>} {<300>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [706 720] ) ] ) (C {<sleep>} {<1>}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$alldead'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<log_action_begin_msg>} {(DQ <'Killing all remaining processes'>)}) (C {<killall5>} {<-9>} {($ Id.VSub_DollarName '$OMITPIDS')}) (C {<log_action_end_msg>} {<1>}) ] spids: [740 754] ) ] else_action: [ (C {<log_action_begin_msg>} {(DQ <'All processes ended within '> ($ Id.VSub_DollarName '$seq') <' seconds'>)} ) (C {<log_action_end_msg>} {<0>}) ] ) ] ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list:[{<start>} {<status>}] spids:[814 817 824 -1]) (case_arm pat_list: [{<restart>} {<reload>} {<force-reload>}] action: [ (command.Simple words: [ {<echo>} {(DQ <'Error: argument \''> ($ Id.VSub_Number '$1') <'\' not supported'>)} ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] spids: [827 832 852 -1] ) (case_arm pat_list:[{<stop>}] action:[(C {<do_stop>})] spids:[855 856 862 -1]) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [{<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number '$0') <' start|stop'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] spids: [865 866 886 -1] ) ] ) (C {<Id.Lit_Colon ':'>}) ] )