(command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_LBracket '[')} {(-x)} {(/sbin/resolvconf)} {(Lit_RBracket ']')}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PATH) op: Equal rhs: {(/sbin) (Lit_Other ':') (/bin)} ) ] ) (command.Assignment pairs: [(assign_pair lhs:(lhs_expr.LhsName name:RUN_DIR) op:Equal rhs:{(/run/resolvconf)})] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ENABLE_UPDATES_FLAGFILE) op: Equal rhs: {(DQ (${ VSub_Name RUN_DIR) (/enable-updates))} ) ] ) (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:POSTPONED_UPDATE_FLAGFILE) op: Equal rhs: {(DQ (${ VSub_Name RUN_DIR) (/postponed-update))} ) ] ) (C {(.)} {(/lib/lsb/init-functions)}) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)} {(restart)} {(force-reload)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(init_is_upstart)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] ) (case_arm pat_list: [{(stop)}] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(init_is_upstart)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) ] ) ] ) (command.FuncDef name: log_action_end_msg_and_exit body: (command.BraceGroup children: [ (C {(log_action_end_msg)} {(DQ ($ VSub_Number '$1'))} { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.Unary op_id: VTest_ColonPlus arg_word: {(DQ ($ VSub_Number '$2'))} ) ) } ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {($ VSub_Number '$1')} ) ] ) ) (command.FuncDef name: create_runtime_directories body: (command.BraceGroup children: [ (C {(umask)} {(022)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_DollarName '$RUN_DIR'))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_LBracket '[')} {(-L)} {(DQ ($ VSub_DollarName '$RUN_DIR'))} {(Lit_RBracket ']')} ) (C {(log_action_end_msg_and_exit)} {(1)} { (DQ ($ VSub_DollarName '$RUN_DIR') (' is neither a directory nor a symbolic link') ) } ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (command.BraceGroup children: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.Assignment pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:RUN_CANONICALDIR) op: Equal rhs: { (DQ (word_part.CommandSub left_token: <Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} {(DQ ($ VSub_DollarName '$RUN_DIR'))} ) ] ) ) ) } ) ] ) (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$RUN_CANONICALDIR'))} {(Lit_RBracket ']')} ) ] ) terminator: <Op_Semi ';'> ) ] ) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('Canonical path of the run directory could not be determined'))} ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(mkdir)} {(DQ ($ VSub_DollarName '$RUN_CANONICALDIR'))}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('Error creating directory ') ($ VSub_DollarName '$RUN_CANONICALDIR'))} ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-d)} {(DQ (${ VSub_Name RUN_DIR) (/interface))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(mkdir)} {(DQ (${ VSub_Name RUN_DIR) (/interface))}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('Error creating directory ') (${ VSub_Name RUN_DIR) (/interface))} ) ] ) ] ) ] ) (command.ControlFlow token:<ControlFlow_Return return>) ] ) ) (command.FuncDef name: wipe_runtime_directories body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_LBracket '[')} {(-d)} {(DQ ($ VSub_DollarName '$RUN_DIR'))} {(Lit_RBracket ']')}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$RUN_DIR')) (/resolv.conf)}) (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$ENABLE_UPDATES_FLAGFILE'))}) (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$POSTPONED_UPDATE_FLAGFILE'))}) (C {(rm)} {(-rf)} {(DQ (${ VSub_Name RUN_DIR) ('/interface/*'))}) (command.ControlFlow token:<ControlFlow_Return return>) ] ) ) (command.Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)}] action: [ (C {(log_action_begin_msg)} {(DQ ('Setting up resolvconf'))}) (C {(wipe_runtime_directories)}) (C {(create_runtime_directories)}) (command.AndOr ops: [Op_DPipe] children: [ (command.Simple words: [{(Lit_Other ':')}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_DollarName '$POSTPONED_UPDATE_FLAGFILE'))} ) ] ) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed requesting update'))}) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(resolvconf)} {(--enable-updates)}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to enable updates'))}) ] ) (C {(log_action_end_msg_and_exit)} {(0)}) ] ) (case_arm pat_list: [{(stop)}] action: [ (C {(log_action_begin_msg)} {(DQ ('Stopping resolvconf'))}) (command.AndOr ops: [Op_DPipe] children: [ (C {(resolvconf)} {(--disable-updates)}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to disable updates'))}) ] ) (C {(log_action_end_msg_and_exit)} {(0)}) ] ) (case_arm pat_list: [{(restart)}] action: [ (C {(log_action_begin_msg)} {(DQ ('Restarting resolvconf'))}) (command.AndOr ops: [Op_DPipe] children: [ (C {(resolvconf)} {(--enable-updates)}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to enable updates'))}) ] ) (C {(log_action_end_msg_and_exit)} {(0)}) ] ) (case_arm pat_list: [{(reload)} {(force-reload)}] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(resolvconf)} {(-u)}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to update'))}) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (case_arm pat_list: [{(enable-updates)}] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(resolvconf)} {(--enable-updates)}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to enable updates'))}) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (case_arm pat_list: [{(disable-updates)}] action: [ (command.AndOr ops: [Op_DPipe] children: [ (C {(resolvconf)} {(--disable-updates)}) (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to disable updates'))}) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (case_arm pat_list: [{(status)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(resolvconf)} {(--updates-are-enabled)}) terminator: <Op_Semi ';'> ) ] action: [(C {(log_success_msg)} {(DQ ('resolvconf updates are enabled'))})] ) ] else_action: [(C {(log_failure_msg)} {(DQ ('resolvconf updates are disabled'))})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (case_arm pat_list: [{(Lit_Star '*')}] action: [ (command.Simple words: [ {(echo)} { (DQ ( 'Usage: /etc/init.d/resolvconf {start|stop|restart|reload|force-reload|enable-updates|disable-updates|status}' ) ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] ) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(99)}) ] )