(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 children: [(C {(Lit_Other "[")} {(-d)} {(/lib/ufw)} {(Lit_Other "]")}) (C {(exit)} {(0)})] op_id: Op_DPipe ) (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: False 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: [-1 96] ) ] else_action: [ (C {(log_failure_msg)} {(DQ ("Could not find ") ($ VSub_Name "$s") (" (aborting)"))}) (C {(exit)} {(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 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 "]")} ) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) ] action: [ (C {(log_action_begin_msg)} {(DQ ("Starting firewall:"))} {(DQ (ufw))}) (AndOr 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] ) ] op_id: Op_DPipe ) (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: [-1 220] ) ] spids: [-1 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: False ) ] spids: [-1 250] ) ] spids: [-1 282] ) ] spids: [-1 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")}) (C {(exit)} {($ VSub_Name "$error")}) ] spids: [139 140 312 -1] ) (case_arm pat_list: [{(stop)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr 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 "]")} ) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) ] action: [ (C {(log_action_begin_msg)} {(DQ ("Stopping firewall:"))} {(DQ (ufw))}) (AndOr 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] ) ] op_id: Op_DPipe ) (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: [-1 393] ) ] spids: [-1 403] ) ] spids: [-1 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")}) (C {(exit)} {($ VSub_Name "$error")}) ] spids: [314 315 433 -1] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: [ (C {(log_action_begin_msg)} {(DQ ("Reloading firewall:"))} {(DQ (ufw))}) (AndOr 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] ) ] op_id: Op_DPipe ) (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: [-1 480] ) ] spids: [-1 490] ) (C {(log_action_end_msg)} {($ VSub_Name "$error")}) (C {(exit)} {($ VSub_Name "$error")}) ] spids: [435 438 503 -1] ) (case_arm pat_list: [{(status)}] action: [ (AndOr 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] ) ] op_id: Op_DPipe ) (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: [-1 537] ) ] spids: [-1 547] ) (C {(log_action_end_msg)} {($ VSub_Name "$error")}) (C {(exit)} {($ VSub_Name "$error")}) ] spids: [505 506 560 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(echo)} {(DQ ("Usage: /etc/init.d/ufw {start|stop|restart|force-reload|status}"))}) (C {(exit)} {(1)}) ] spids: [562 563 578 -1] ) ] spids: [131 137 580] ) (C {(exit)} {(0)}) ] )