(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:DESC) rhs: {(DQ ("automatic crash report generation"))} spids: [29] ) ] spids: [29] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:NAME) rhs:{(apport)} spids:[34])] spids: [34] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:AGENT) rhs:{(/usr/share/apport/apport)} spids:[37])] spids: [37] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:SCRIPTNAME) rhs: {(/etc/init.d/) ($ VSub_Name "$NAME")} spids: [40] ) ] spids: [40] ) (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {(DQ ($ VSub_Name "$AGENT"))} {(Lit_Other "]")}) (C {(exit)} {(0)}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:enabled) rhs:{(1)} spids:[68])] spids: [68] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(/etc/default/) ($ VSub_Name "$NAME")} {(Lit_Other "]")}) (AndOr children: [(C {(.)} {(/etc/default/) ($ VSub_Name "$NAME")}) (C {(true)})] op_id: Op_DPipe ) ] op_id: Op_DAmp ) (C {(.)} {(/lib/lsb/init-functions)}) (FuncDef name: do_start body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(/var/crash)} {(Lit_Other "]")}) (C {(mkdir)} {(-p)} {(/var/crash)}) ] op_id: Op_DPipe ) (C {(chmod)} {(1777)} {(/var/crash)}) (If arms: [ (if_arm cond: (Sentence command: (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(/var/crash/vmcore)} {(Lit_Other "]")}) (C {(Lit_Other "[")} {(-n)} { (DQ (CommandSubPart command_list: (Pipeline children: [ (C {(ls)} {(/var/crash)}) (C {(egrep)} {(Lit_Other "^") (Lit_Other "[") (0-9) (Lit_Other "]") (Lit_LBrace "{") (12) (Lit_RBrace "}") (Lit_Other "$") } ) ] negated: False ) spids: [182 199] ) ) } {(Lit_Other "]")} ) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) action: (AndOr children: [(C {(/usr/share/apport/kernel_crashdump)}) (C {(true)})] op_id: Op_DPipe ) spids: [-1 204] ) ] spids: [-1 214] ) (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(-e)} {(/var/lib/pm-utils/status)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (AndOr children: [(C {(/usr/share/apport/apportcheckresume)}) (C {(true)})] op_id: Op_DPipe ) (C {(rm)} {(-f)} {(/var/lib/pm-utils/status)}) (C {(rm)} {(-f)} {(/var/lib/pm-utils/resume-hang.log)}) ] ) spids: [-1 233] ) ] spids: [-1 257] ) (SimpleCommand words: [{(echo)} {(DQ ("|") ($ VSub_Name "$AGENT") (" %p %s %c %P"))}] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/proc/sys/kernel/core_pattern)} fd: -1 spids: [269] ) ] ) ] spids: [116] ) spids: [112 115] ) (FuncDef name: do_stop body: (BraceGroup children: [ (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(-e)} {(/var/lib/pm-utils/status)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) action: (SimpleCommand words: [{(ps)} {(-wwef)}] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/var/lib/pm-utils/resume-hang.log)} fd: -1 spids: [339] ) ] ) spids: [-1 332] ) ] spids: [-1 343] ) (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} { (DQ (CommandSubPart command_list: (SimpleCommand words: [ {(dd)} {(Lit_VarLike "if=") (/proc/sys/kernel/core_pattern)} {(Lit_VarLike "count=") (1)} {(Lit_VarLike "bs=") (1)} ] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: 2 spids: [364] ) ] ) spids: [352 366] ) ) } {(KW_Bang "!") (Lit_Other "=")} {(DQ ("|"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (C {(return)} {(1)}) spids: [-1 379] ) ] else_action: (SimpleCommand words: [{(echo)} {(DQ (core))}] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/proc/sys/kernel/core_pattern)} fd: -1 spids: [396] ) ] ) spids: [387 401] ) ] spids: [289] ) spids: [285 288] ) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list: [{(start)}] action: (CommandList children: [ (AndOr children: [ (C {(grep)} {(-zqs)} {(SQ <"^container=">)} {(/proc/1/environ)}) (C {(exit)} {(0)}) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$enabled"))} {(Lit_Other "=")} {(DQ (1))} {(Lit_Other "]")} ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$force_start"))} {(Lit_Other "=")} {(DQ (1))} {(Lit_Other "]")} ) (C {(exit)} {(0)}) ] op_id: Op_DPipe ) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_daemon_msg)} {(DQ ("Starting ") ($ VSub_Name "$DESC") (":"))} {(DQ ($ VSub_Name "$NAME"))} ) ] op_id: Op_DAmp ) (C {(do_start)}) (Case to_match: {(DQ ($ VSub_QMark "$?"))} arms: [ (case_arm pat_list: [{(0)} {(1)}] action: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_end_msg)} {(0)}) ] op_id: Op_DAmp ) spids: [518 521 542 -1] ) (case_arm pat_list: [{(2)}] action: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_end_msg)} {(1)}) ] op_id: Op_DAmp ) spids: [545 546 567 -1] ) ] spids: [509 515 570] ) ] ) spids: [415 416 573 -1] ) (case_arm pat_list: [{(stop)}] action: (CommandList children: [ (AndOr children: [ (C {(grep)} {(-zqs)} {(SQ <"^container=">)} {(/proc/1/environ)}) (C {(exit)} {(0)}) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_daemon_msg)} {(DQ ("Stopping ") ($ VSub_Name "$DESC") (":"))} {(DQ ($ VSub_Name "$NAME"))} ) ] op_id: Op_DAmp ) (C {(do_stop)}) (Case to_match: {(DQ ($ VSub_QMark "$?"))} arms: [ (case_arm pat_list: [{(0)} {(1)}] action: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_end_msg)} {(0)}) ] op_id: Op_DAmp ) spids: [642 645 666 -1] ) (case_arm pat_list: [{(2)}] action: (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_end_msg)} {(1)}) ] op_id: Op_DAmp ) spids: [669 670 691 -1] ) ] spids: [633 639 694] ) ] ) spids: [576 577 697 -1] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: (CommandList children: [ (AndOr children: [(C {($ VSub_Number "$0")} {(stop)}) (C {(true)})] op_id: Op_DPipe ) (C {($ VSub_Number "$0")} {(start)}) ] ) spids: [700 703 720 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: (CommandList children: [ (SimpleCommand words: [ {(echo)} { (DQ ("Usage: ") ($ VSub_Name "$SCRIPTNAME") (" {start|stop|restart|force-reload}") ) } ] redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[735])] ) (C {(exit)} {(3)}) ] ) spids: [723 724 744 -1] ) ] spids: [406 412 746] ) (C {(Lit_Other ":")}) ] )