(command.CommandList children: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PATH) op: Equal rhs: {(/sbin) (Lit_Other ':') (/usr/sbin) (Lit_Other ':') (/bin) (Lit_Other ':') (/usr/bin)} ) ] ) (C {(export)} {(PATH)}) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:scriptname) op: Equal rhs: {(DQ ($ VSub_Number '$0'))} ) ] ) (C {(umask)} {(022)}) (command.FuncDef name: on_exit body: (command.BraceGroup children: [ (C {(echo)} { (DQ ("error: '") ($ VSub_DollarName '$scriptname') ("' exited outside the expected code flow.") ) } ) ] ) ) (C {(trap)} {(on_exit)} {(EXIT)}) (C {(trap)} {(DQ (':'))} {(INT)} {(QUIT)} {(TSTP)}) (command.Simple words: [{(stty)} {(onlcr)}] redirects: [(redir.Redir op:<Redir_GreatAnd '0>&'> fd:0 arg_word:{(1)})] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:runlevel) op: Equal rhs: {($ VSub_DollarName '$RUNLEVEL')} ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_Number '$1'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ )} {(Lit_RBracket ']')} ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:runlevel) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$runlevel'))} {(Lit_Other '=')} {(DQ )} {(Lit_RBracket ']')} ) ] action: [ (command.Simple words: [{(echo)} {(DQ ('Usage: ') ($ VSub_DollarName '$scriptname') (' <runlevel>'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:previous) op: Equal rhs: {($ VSub_DollarName '$PREVLEVEL')} ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$previous'))} {(Lit_Other '=')} {(DQ )} {(Lit_RBracket ']')} ) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:previous) op:Equal rhs:{(N)})] ) ] ) (C {(export)} {(runlevel)} {(previous)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(-f)} {(/etc/default/rcS)} {(Lit_RBracket ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(.)} {(/etc/default/rcS)})] ) ] ) (C {(export)} {(VERBOSE)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(-f)} {(/lib/lsb/init-functions)} {(Lit_RBracket ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(.)} {(/lib/lsb/init-functions)})] ) ] else_action: [ (command.FuncDef name: log_action_msg body: (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {($ VSub_At '$@')}) terminator: <Op_Semi ';'> ) ] ) ) (command.FuncDef name: log_failure_msg body: (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {($ VSub_At '$@')}) terminator: <Op_Semi ';'> ) ] ) ) (command.FuncDef name: log_warning_msg body: (command.BraceGroup children: [ (command.Sentence child: (C {(echo)} {($ VSub_At '$@')}) terminator: <Op_Semi ';'> ) ] ) ) ] ) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CONCURRENCY) op:Equal rhs:{(none)})] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-s)} {(/etc/init.d/.depend.boot)}) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CONCURRENCY) op:Equal rhs:{(DQ (none))})] ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-s)} {(/etc/init.d/.depend.start)}) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CONCURRENCY) op:Equal rhs:{(DQ (none))})] ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-s)} {(/etc/init.d/.depend.stop)}) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CONCURRENCY) op:Equal rhs:{(DQ (none))})] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-e)} {(/etc/init.d/.legacy-bootordering)}) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CONCURRENCY) op:Equal rhs:{(DQ (none))})] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children:[(C {(test)} {(-e)} {(/proc/stat)})] negated:T) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} { (DQ (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(uname)})]) ) ) } {(Lit_Other '=')} {(DQ (GNU/kFreeBSD))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(mount)} {(-t)} {(linprocfs)} {(linprocfs)} {(/proc)})] ) (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} { (DQ (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(uname)})]) ) ) } {(Lit_Other '=')} {(DQ (GNU))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(mount)} {(-t)} {(proc)} {(none)} {(/proc)})] ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(-x)} {(/lib/startpar/startpar)} {(Lit_RBracket ']')}) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:STARTPAR) op: Equal rhs: {(/lib/startpar/startpar)} ) ] ) ] ) ] else_action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:STARTPAR) op:Equal rhs:{(startpar)})] ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (command.Simple words: [{($ VSub_DollarName '$STARTPAR')} {(-v)}] redirects: [ (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CONCURRENCY) op:Equal rhs:{(DQ (none))})] ) ] ) (command.Case to_match: {(DQ ($ VSub_DollarName '$CONCURRENCY'))} arms: [ (case_arm pat_list: [{(makefile)} {(startpar)} {(shell)}] action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CONCURRENCY) op:Equal rhs:{(makefile)})] ) (C {(log_action_msg)} { (DQ ('Using makefile-style concurrent boot in runlevel ') ($ VSub_DollarName '$runlevel') ) } ) (command.FuncDef name: startup body: (command.BraceGroup children: [ (C {(eval)} { (DQ (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {($ VSub_DollarName '$STARTPAR')} {(-p)} {(4)} {(-t)} {(20)} {(-T)} {(3)} {(-M)} {($ VSub_Number '$1')} {(-P)} {($ VSub_DollarName '$previous')} {(-R)} {($ VSub_DollarName '$runlevel')} ) ] ) ) ) } ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(-n)} {(DQ ($ VSub_DollarName '$failed_service'))} {(Lit_RBracket ']')} ) ] action: [ (C {(log_failure_msg)} { (DQ ('startpar: service(s) returned failure: ') ($ VSub_DollarName '$failed_service') ) } ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(-n)} {(DQ ($ VSub_DollarName '$skipped_service_not_installed'))} {(Lit_RBracket ']')} ) ] action: [ (C {(log_warning_msg)} { (DQ ('startpar: service(s) skipped, program is not installed: ') ($ VSub_DollarName '$skipped_service_not_installed') ) } ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(-n)} {(DQ ($ VSub_DollarName '$skipped_service_not_configured'))} {(Lit_RBracket ']')} ) ] action: [ (C {(log_warning_msg)} { (DQ ('startpar: service(s) skipped, program is not configured: ') ($ VSub_DollarName '$skipped_service_not_configured') ) } ) ] ) ] ) (C {(unset)} {(failed_service)} {(skipped_service_not_installed)} {(skipped_service_not_configured)} ) ] ) ) ] ) (case_arm pat_list: [{(none)} {(Lit_Star '*')}] action: [ (command.FuncDef name: startup body: (command.BraceGroup children: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:action) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (C {(shift)}) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:scripts) op: Equal rhs: {(DQ ($ VSub_At '$@'))} ) ] ) (command.ForEach iter_name: script iter_words: [{($ VSub_DollarName '$scripts')}] do_arg_iter: F body: (command.DoGroup children: [ (C {($ VSub_DollarName '$debug')} {(DQ ($ VSub_DollarName '$script'))} {($ VSub_DollarName '$action')} ) ] ) ) ] ) ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(-d)} {(/etc/rc) ($ VSub_DollarName '$runlevel') (.d)} {(Lit_RBracket ']')} ) ] action: [ (command.Case to_match: {(DQ ($ VSub_DollarName '$runlevel'))} arms: [ (case_arm pat_list: [{(0)} {(6)}] action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ACTION) op:Equal rhs:{(stop)})] ) ] ) (case_arm pat_list: [{(S)}] action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ACTION) op:Equal rhs:{(start)})] ) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:ACTION) op:Equal rhs:{(start)})] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(makefile)} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$CONCURRENCY'))} {(Lit_RBracket ']')} ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$ACTION'))} {(Lit_Other '=')} {(DQ (start))} {(Lit_RBracket ']')} ) (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$previous'))} {(KW_Bang '!') (Lit_Other '=')} {(N)} {(Lit_RBracket ']')} ) ] ) ] action: [(C {(startup)} {(stop)})] ) ] ) ] ) (if_arm cond: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$previous'))} {(KW_Bang '!') (Lit_Other '=')} {(N)} {(Lit_RBracket ']')} ) ] action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CURLEVEL) op:Equal rhs:{(DQ )})] ) (command.ForEach iter_name: s iter_words: [{(/etc/rc) ($ VSub_DollarName '$runlevel') (.d/K) (Lit_Star '*')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:level) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name s> suffix_op: (suffix_op.Unary op_id: VOp1_Pound arg_word: {(Lit_Slash /) (etc) (Lit_Slash /) (rc) ($ VSub_DollarName '$runlevel') (.d) (Lit_Slash /) (K) } ) ) } ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:level) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name level> suffix_op: (suffix_op.Unary op_id: VOp1_DPercent arg_word: {('[a-zA-Z]*')} ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$level'))} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$CURLEVEL'))} {(Lit_RBracket ']')} ) ] action: [(command.ControlFlow token:<ControlFlow_Continue continue>)] ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CURLEVEL) op: Equal rhs: {($ VSub_DollarName '$level')} ) ] ) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:SCRIPTS) op:Equal rhs:{(DQ )})] ) (command.ForEach iter_name: i iter_words: [ {(/etc/rc) ($ VSub_DollarName '$runlevel') (.d/K) ($ VSub_DollarName '$level') (Lit_Star '*') } ] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-f)} {($ VSub_DollarName '$i')} {(Lit_RBracket ']')} ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:suffix) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name i> suffix_op: (suffix_op.Unary op_id: VOp1_Pound arg_word: {(Lit_Slash /) (etc) (Lit_Slash /) (rc) ($ VSub_DollarName '$runlevel') (.d) (Lit_Slash /) ('K[0-9][0-9]') } ) ) } ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:previous_stop) op: Equal rhs: {(/etc/rc) ($ VSub_DollarName '$previous') (.d/K) (Lit_LBracket '[') (0-9) (Lit_RBracket ']') (Lit_LBracket '[') (0-9) (Lit_RBracket ']') ($ VSub_DollarName '$suffix') } ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:previous_start) op: Equal rhs: {(/etc/rc) ($ VSub_DollarName '$previous') (.d/S) (Lit_LBracket '[') (0-9) (Lit_RBracket ']') (Lit_LBracket '[') (0-9) (Lit_RBracket ']') ($ VSub_DollarName '$suffix') } ) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(-f)} {($ VSub_DollarName '$previous_stop')} {(Lit_RBracket ']')} ) (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-f)} {($ VSub_DollarName '$previous_start')} {(Lit_RBracket ']')} ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SCRIPTS) op: Equal rhs: { (DQ ($ VSub_DollarName '$SCRIPTS') (' ') ($ VSub_DollarName '$i') ) } ) ] ) ] ) ) (C {(startup)} {(stop)} {($ VSub_DollarName '$SCRIPTS')}) ] ) ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(makefile)} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$CONCURRENCY'))} {(Lit_RBracket ']')} ) ] action: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(S)} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$runlevel'))} {(Lit_RBracket ']')} ) ] action: [(C {(startup)} {(boot)})] ) ] else_action: [(C {(startup)} {($ VSub_DollarName '$ACTION')})] ) ] ) ] else_action: [ (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:CURLEVEL) op:Equal rhs:{(DQ )})] ) (command.ForEach iter_name: s iter_words: [{(/etc/rc) ($ VSub_DollarName '$runlevel') (.d/S) (Lit_Star '*')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:level) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name s> suffix_op: (suffix_op.Unary op_id: VOp1_Pound arg_word: {(Lit_Slash /) (etc) (Lit_Slash /) (rc) ($ VSub_DollarName '$runlevel') (.d) (Lit_Slash /) (S) } ) ) } ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:level) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name level> suffix_op: (suffix_op.Unary op_id: VOp1_DPercent arg_word: {('[a-zA-Z]*')} ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$level'))} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$CURLEVEL'))} {(Lit_RBracket ']')} ) ] action: [(command.ControlFlow token:<ControlFlow_Continue continue>)] ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:CURLEVEL) op: Equal rhs: {($ VSub_DollarName '$level')} ) ] ) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:SCRIPTS) op:Equal rhs:{(DQ )})] ) (command.ForEach iter_name: i iter_words: [ {(/etc/rc) ($ VSub_DollarName '$runlevel') (.d/S) ($ VSub_DollarName '$level') (Lit_Star '*') } ] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-f)} {($ VSub_DollarName '$i')} {(Lit_RBracket ']')} ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:suffix) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name i> suffix_op: (suffix_op.Unary op_id: VOp1_Pound arg_word: {(Lit_Slash /) (etc) (Lit_Slash /) (rc) ($ VSub_DollarName '$runlevel') (.d) (Lit_Slash /) ('S[0-9][0-9]') } ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$previous'))} {(KW_Bang '!') (Lit_Other '=')} {(N)} {(Lit_RBracket ']')} ) ] action: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:stop) op: Equal rhs: {(/etc/rc) ($ VSub_DollarName '$runlevel') (.d/K) (Lit_LBracket '[') (0-9) (Lit_RBracket ']') (Lit_LBracket '[') (0-9) (Lit_RBracket ']') ($ VSub_DollarName '$suffix') } ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:previous_start) op: Equal rhs: {(/etc/rc) ($ VSub_DollarName '$previous') (.d/S) (Lit_LBracket '[') (0-9) (Lit_RBracket ']') (Lit_LBracket '[') (0-9) (Lit_RBracket ']') ($ VSub_DollarName '$suffix') } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(start)} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$ACTION'))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(-f)} {($ VSub_DollarName '$previous_start')} {(Lit_RBracket ']')} ) (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-f)} {($ VSub_DollarName '$stop')} {(Lit_RBracket ']')} ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) ] ) ] else_action: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:previous_stop) op: Equal rhs: {(/etc/rc) ($ VSub_DollarName '$previous') (.d/K) (Lit_LBracket '[') (0-9) (Lit_RBracket ']') (Lit_LBracket '[') (0-9) (Lit_RBracket ']') ($ VSub_DollarName '$suffix') } ) ] ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(-f)} {($ VSub_DollarName '$previous_stop')} {(Lit_RBracket ']')} ) (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-f)} {($ VSub_DollarName '$previous_start')} {(Lit_RBracket ']')} ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) ] ) ] ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SCRIPTS) op: Equal rhs: { (DQ ($ VSub_DollarName '$SCRIPTS') (' ') ($ VSub_DollarName '$i') ) } ) ] ) ] ) ) (C {(startup)} {($ VSub_DollarName '$ACTION')} {($ VSub_DollarName '$SCRIPTS')}) ] ) ) ] ) ] ) ] ) (C {(trap)} {(-)} {(EXIT)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )