(CommandList children: [ (C {(set)} {(-e)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:PATH) op:Equal rhs:{(DQ ('/sbin:/bin'))} spids:[34])] spids: [34] ) (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-d)} {(/lib/ufw)} {(Lit_Other ']')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (C {(.)} {(/lib/lsb/init-functions)}) (ForEach iter_name: s iter_words: [ {(DQ (/lib/ufw/ufw-init-functions))} {(DQ (/etc/ufw/ufw.conf))} {(DQ (/etc/default/ufw))} ] do_arg_iter: F body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-s)} {(DQ ($ VSub_Name '$s'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(.)} {(DQ ($ VSub_Name '$s'))})] spids: [16777215 96] ) ] else_action: [ (C {(log_failure_msg)} {(DQ ('Could not find ') ($ VSub_Name '$s') (' (aborting)'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [106 123] ) ] spids: [80 125] ) spids: [65 78] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:error) op:Equal rhs:{(0)} spids:[128])] spids: [128] ) (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$ENABLED'))} {(Lit_Other '=')} {(DQ (yes))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$ENABLED'))} {(Lit_Other '=')} {(DQ (YES))} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_action_begin_msg)} {(DQ ('Starting firewall:'))} {(DQ (ufw))}) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:output) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(ufw_start)})]) left_token: <Left_Backtick '`'> spids: [191 193] ) } spids: [190] ) ] spids: [190] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:error) op: Equal rhs: {(DQ ($ VSub_QMark '$?'))} spids: [197] ) ] spids: [197] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$error'))} {(Lit_Other '=')} {(DQ (0))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_action_cont_msg)} {(DQ ('Setting kernel variables (') ($ VSub_Name '$IPT_SYSCTL') (')'))} ) ] spids: [16777215 220] ) ] spids: [16777215 232] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$output'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$output'))}) (While cond: [ (Sentence child: (C {(read)} {(line)}) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (C {(log_action_cont_msg)} {(DQ ($ VSub_Name '$line'))}) ] spids: [269 279] ) ) ] negated: F ) ] spids: [16777215 250] ) ] spids: [16777215 282] ) ] spids: [16777215 176] ) ] else_action: [ (C {(log_action_begin_msg)} {(DQ ('Skip starting firewall:'))} {(DQ ('ufw (not enabled)'))} ) ] spids: [285 299] ) (C {(log_action_end_msg)} {($ VSub_Name '$error')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_Name '$error')}) ] spids: [139 140 312 16777215] ) (case_arm pat_list: [{(stop)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$ENABLED'))} {(Lit_Other '=')} {(DQ (yes))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$ENABLED'))} {(Lit_Other '=')} {(DQ (YES))} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_action_begin_msg)} {(DQ ('Stopping firewall:'))} {(DQ (ufw))}) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:output) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(ufw_stop)})]) left_token: <Left_Backtick '`'> spids: [366 368] ) } spids: [365] ) ] spids: [365] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:error) op: Equal rhs: {(DQ ($ VSub_QMark '$?'))} spids: [372] ) ] spids: [372] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$output'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(log_action_cont_msg)} {(DQ ($ VSub_Name '$output'))})] spids: [16777215 393] ) ] spids: [16777215 403] ) ] spids: [16777215 351] ) ] else_action: [ (C {(log_action_begin_msg)} {(DQ ('Skip stopping firewall:'))} {(DQ ('ufw (not enabled)'))} ) ] spids: [406 420] ) (C {(log_action_end_msg)} {($ VSub_Name '$error')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_Name '$error')}) ] spids: [314 315 433 16777215] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: [ (C {(log_action_begin_msg)} {(DQ ('Reloading firewall:'))} {(DQ (ufw))}) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:output) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(ufw_reload)})]) left_token: <Left_Backtick '`'> spids: [453 455] ) } spids: [452] ) ] spids: [452] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:error) op: Equal rhs: {(DQ ($ VSub_QMark '$?'))} spids: [459] ) ] spids: [459] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$output'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(log_action_cont_msg)} {(DQ ($ VSub_Name '$output'))})] spids: [16777215 480] ) ] spids: [16777215 490] ) (C {(log_action_end_msg)} {($ VSub_Name '$error')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_Name '$error')}) ] spids: [435 438 503 16777215] ) (case_arm pat_list: [{(status)}] action: [ (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:output) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(ufw_status)})]) left_token: <Left_Backtick '`'> spids: [510 512] ) } spids: [509] ) ] spids: [509] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:error) op: Equal rhs: {(DQ ($ VSub_QMark '$?'))} spids: [516] ) ] spids: [516] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$output'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(log_action_cont_msg)} {(DQ ($ VSub_Name '$output'))})] spids: [16777215 537] ) ] spids: [16777215 547] ) (C {(log_action_end_msg)} {($ VSub_Name '$error')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_Name '$error')}) ] spids: [505 506 560 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(echo)} {(DQ ('Usage: /etc/init.d/ufw {start|stop|restart|force-reload|status}'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [562 563 578 16777215] ) ] spids: [131 137 580] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )