(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DESC) op: assign_op.Equal rhs: {(DQ ('automatic crash report generation'))} spids: [29] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NAME) op: assign_op.Equal rhs: {(apport)} spids: [34] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:AGENT) op: assign_op.Equal rhs: {(/usr/share/apport/apport)} spids: [37] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SCRIPTNAME) op: assign_op.Equal rhs: {(/etc/init.d/) ($ Id.VSub_DollarName '$NAME')} spids: [40] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(-x)} {(DQ ($ Id.VSub_DollarName '$AGENT'))} {(Id.Lit_RBracket ']')}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:60) arg_word: {(0)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:enabled) op: assign_op.Equal rhs: {(1)} spids: [68] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(-e)} {(/etc/default/) ($ Id.VSub_DollarName '$NAME')} {(Id.Lit_RBracket ']')} ) (C {(.)} {(/etc/default/) ($ Id.VSub_DollarName '$NAME')}) (C {(true)}) ] ) (C {(.)} {(/lib/lsb/init-functions)}) (command.ShFunction name: do_start body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(-e)} {(/var/crash)} {(Id.Lit_RBracket ']')}) (C {(mkdir)} {(-p)} {(/var/crash)}) ] ) (C {(chmod)} {(1777)} {(/var/crash)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(-e)} {(/var/crash/vmcore)} {(Id.Lit_RBracket ']')} ) (C {(Id.Lit_LBracket '[')} {(-n)} { (DQ (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:182) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(ls)} {(/var/crash)}) (C {(egrep)} {(Id.Lit_Other '^') (Id.Lit_LBracket '[') (0-9) (Id.Lit_RBracket ']') (Id.Lit_LBrace '{') (12) (Id.Lit_RBrace '}') (Id.Lit_Other '$') } ) ] negated: F ) ] ) ) ) } {(Id.Lit_RBracket ']')} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:205) ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [(C {(/usr/share/apport/kernel_crashdump)}) (C {(true)})] ) ] spids: [165 206] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-e)} {(/var/lib/pm-utils/status)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:233) ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [(C {(/usr/share/apport/apportcheckresume)}) (C {(true)})] ) (C {(rm)} {(-f)} {(/var/lib/pm-utils/status)}) (C {(rm)} {(-f)} {(/var/lib/pm-utils/resume-hang.log)}) ] spids: [224 235] ) ] ) (command.Simple words: [{(echo)} {(DQ ('|') ($ Id.VSub_DollarName '$AGENT') (' %p %s %c %d %P'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:271) fd: -1 arg_word: {(/proc/sys/kernel/core_pattern)} ) ] ) (command.Simple words: [{(echo)} {(2)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:280) fd: -1 arg_word: {(/proc/sys/fs/suid_dumpable)} ) ] ) ] ) ) (command.ShFunction name: do_stop body: (command.BraceGroup children: [ (command.Simple words: [{(echo)} {(0)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:328) fd: -1 arg_word: {(/proc/sys/fs/suid_dumpable)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(-e)} {(/var/lib/pm-utils/status)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:351) ) ] action: [ (command.Simple words: [{(ps)} {(-wwef)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:360) fd: -1 arg_word: {(/var/lib/pm-utils/resume-hang.log)} ) ] ) ] spids: [342 353] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} { (DQ (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:373) command_list: (command.CommandList children: [ (command.Simple words: [ {(dd)} {(Id.Lit_VarLike 'if=') (/proc/sys/kernel/core_pattern)} {(Id.Lit_VarLike 'count=') (1)} {(Id.Lit_VarLike 'bs=') (1)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:387) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) ) } {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ ('|'))} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:400) ) ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:405) arg_word: {(1)} ) ] spids: [368 402] ) ] else_action: [ (command.Simple words: [{(echo)} {(DQ (core))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:419) fd: -1 arg_word: {(/proc/sys/kernel/core_pattern)} ) ] ) ] ) ] ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(grep)} {(-zqs)} {(SQ (Token id:Id.Lit_Chars val:'^container=' span_id:451))} {(/proc/1/environ)} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:458) arg_word: {(0)} ) ] ) (command.AndOr ops: [Id.Op_DPipe Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$enabled'))} {(Id.Lit_Equals '=')} {(DQ (1))} {(Id.Lit_RBracket ']')} ) (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$force_start'))} {(Id.Lit_Equals '=')} {(DQ (1))} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:496) arg_word: {(0)} ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) (C {(log_daemon_msg)} {(DQ ('Starting ') ($ Id.VSub_DollarName '$DESC') (':'))} {(DQ ($ Id.VSub_DollarName '$NAME'))} ) ] ) (C {(do_start)}) (command.Case to_match: {(DQ ($ Id.VSub_QMark '$?'))} arms: [ (case_arm pat_list: [{(0)} {(1)}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) (C {(log_end_msg)} {(0)}) ] ) ] spids: [541 544 565 -1] ) (case_arm pat_list: [{(2)}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) (C {(log_end_msg)} {(1)}) ] ) ] spids: [568 569 590 -1] ) ] ) ] spids: [438 439 596 -1] ) (case_arm pat_list: [{(stop)}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(grep)} {(-zqs)} {(SQ (Token id:Id.Lit_Chars val:'^container=' span_id:612))} {(/proc/1/environ)} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:619) arg_word: {(0)} ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) (C {(log_daemon_msg)} {(DQ ('Stopping ') ($ Id.VSub_DollarName '$DESC') (':'))} {(DQ ($ Id.VSub_DollarName '$NAME'))} ) ] ) (C {(do_stop)}) (command.Case to_match: {(DQ ($ Id.VSub_QMark '$?'))} arms: [ (case_arm pat_list: [{(0)} {(1)}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) (C {(log_end_msg)} {(0)}) ] ) ] spids: [665 668 689 -1] ) (case_arm pat_list: [{(2)}] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) (C {(log_end_msg)} {(1)}) ] ) ] spids: [692 693 714 -1] ) ] ) ] spids: [599 600 720 -1] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [(C {($ Id.VSub_Number '$0')} {(stop)}) (C {(true)})] ) (C {($ Id.VSub_Number '$0')} {(start)}) ] spids: [723 726 743 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.Simple words: [ {(echo)} { (DQ ('Usage: ') ($ Id.VSub_DollarName '$SCRIPTNAME') (' {start|stop|restart|force-reload}') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:758) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:762) arg_word: {(3)} ) ] spids: [746 747 767 -1] ) ] ) (C {(Id.Lit_Other ':')}) ] )