(command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_LBracket '[')} {(-f)} {(/proc/modules)} {(Lit_RBracket ']')}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_LBracket '[')} {(-x)} {(/sbin/modprobe)} {(Lit_RBracket ']')}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(-f)} {(/etc/default/rcS)} {(Lit_RBracket ']')}) (C {(.)} {(/etc/default/rcS)}) ] ) (C {(.)} {(/lib/lsb/init-functions)}) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:PATH) op:Equal rhs:{(SQ <'/sbin:/bin'>)})] ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)}] action: [ (command.If arms: [ (if_arm cond: [(command.Sentence child:(C {(init_is_upstart)}) terminator:<Op_Semi ';'>)] action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})] ) ] ) ] ) (case_arm pat_list: [{(stop)} {(restart)} {(reload)} {(force-reload)}] action: [ (C {(log_warning_msg)} {(DQ ("Action '") ($ VSub_Number '$1') ("' is meaningless for this init script"))} ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (C {(log_success_msg)} {(DQ ('Usage: ') ($ VSub_Number '$0') (' start'))}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] ) (command.FuncDef name: load_module body: (command.BraceGroup children: [ (C {(local)} {(module)} {(args)}) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:module) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:args) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_action_msg)} {(DQ ('Loading kernel module ') ($ VSub_DollarName '$module'))} ) (command.AndOr ops: [Op_DPipe] children: [ (C {(modprobe)} {($ VSub_DollarName '$module')} {($ VSub_DollarName '$args')}) (C {(true)}) ] ) ] ) ] else_action: [ (command.AndOr ops: [Op_DPipe] children: [ (command.Simple words: [{(modprobe)} {($ VSub_DollarName '$module')} {($ VSub_DollarName '$args')}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) (C {(true)}) ] ) ] ) ] ) ) (command.FuncDef name: modules_files body: (command.BraceGroup children: [ (C {(local)} {(Lit_VarLike 'modules_load_dirs=') (SQ < '/etc/modules-load.d /run/modules-load.d /usr/local/lib/modules-load.d /usr/lib/modules-load.d /lib/modules-load.d' > ) } ) (C {(local)} {(Lit_VarLike 'processed=') (SQ <' '>)}) (C {(local)} {(Lit_VarLike 'add_etc_modules=') (true)}) (command.ForEach iter_name: dir iter_words: [{($ VSub_DollarName '$modules_load_dirs')}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_LBracket '[')} {(-d)} {($ VSub_DollarName '$dir')} {(Lit_RBracket ']')}) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) (command.ForEach iter_name: file iter_words: [ { (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (command.Simple words: [ {(run-parts)} {(--list)} {(--regex) (Lit_Other '=') (SQ <'\\.conf$'>)} {($ VSub_DollarName '$dir')} ] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(true)}) ] ) ] ) ) } ] do_arg_iter: F body: (command.DoGroup children: [ (C {(local)} {(Lit_VarLike 'base=') (word_part.BracedVarSub token: <VSub_Name file> suffix_op: (suffix_op.Unary op_id: VOp1_DPound arg_word: {('*') (Lit_Slash /)} ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} {(-n)} {(DQ ($ VSub_DollarName '$processed'))}) (C {(grep)} {(-qF)} {(DQ (' ') ($ VSub_DollarName '$base') (' '))} ) ] negated: F ) terminator: <Op_Semi ';'> ) ] action: [(command.ControlFlow token:<ControlFlow_Continue continue>)] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$add_etc_modules'))} {(-a)} {(-L)} {($ VSub_DollarName '$file')} {(-a)} { (DQ (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} {($ VSub_DollarName '$file')} ) ] ) ) ) } {(Lit_Other '=')} {(/etc/modules)} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:add_etc_modules) op: Equal rhs: (word.Empty) ) ] ) ] ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:processed) op: Equal rhs: { (DQ ($ VSub_DollarName '$processed') ($ VSub_DollarName '$base') (' ') ) } ) ] ) (C {(echo)} {($ VSub_DollarName '$file')}) ] ) ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$add_etc_modules'))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(/etc/modules)})] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} {(Lit_Other '=')} {(no)} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(log_action_begin_msg)} {(SQ <'Loading kernel modules'>)})] ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:files) op: Equal rhs: { (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children:[(C {(modules_files)})]) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$files'))} {(Lit_RBracket ']')}) terminator: <Op_Semi ';'> ) ] action: [ (command.Pipeline children: [ (C {(grep)} {(-h)} {(SQ <'^[^#]'>)} {($ VSub_DollarName '$files')}) (command.WhileUntil keyword: <KW_While while> cond: [ (command.Sentence child: (C {(read)} {(module)} {(args)}) terminator: <Op_Semi ';'> ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$module'))} {(Lit_RBracket ']')} ) (command.ControlFlow token: <ControlFlow_Continue continue> ) ] ) (C {(load_module)} {(DQ ($ VSub_DollarName '$module'))} {(DQ ($ VSub_DollarName '$args'))} ) ] ) ) ] negated: F ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} {(Lit_Other '=')} {(no)} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(log_action_end_msg)} {(0)})] ) ] ) ] )