(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PATH) op: Equal rhs: {(/sbin) (Lit_Other ":") (/bin)} spids: [46] ) ] spids: [46] ) (C {(.)} {(/lib/init/vars.sh)}) (C {(.)} {(/lib/lsb/init-functions)}) (FuncDef name: do_start body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(-f)} {(/etc/hostname)} {(Lit_Other "]")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOSTNAME) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(cat)} {(/etc/hostname)})]) left_token: <Left_CommandSub "$("> spids: [81 85] ) ) } spids: [79] ) ] spids: [79] ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$HOSTNAME"))} {(Lit_Other "]")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOSTNAME) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(hostname)})]) left_token: <Left_CommandSub "$("> spids: [108 110] ) ) } spids: [106] ) ] spids: [106] ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$HOSTNAME"))} {(Lit_Other "]")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOSTNAME) op: Equal rhs: {(localhost)} spids: [131] ) ] spids: [131] ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_action_begin_msg)} {(DQ ("Setting hostname to '") ($ VSub_Name "$HOSTNAME") ("'"))} ) ] op_id: Op_DAmp ) (C {(hostname)} {(DQ ($ VSub_Name "$HOSTNAME"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ES) op: Equal rhs: {($ VSub_QMark "$?")} spids: [167] ) ] spids: [167] ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_action_end_msg)} {($ VSub_Name "$ES")}) ] op_id: Op_DAmp ) (C {(exit)} {($ VSub_Name "$ES")}) ] spids: [66] ) spids: [61 65] ) (FuncDef name: do_status body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HOSTNAME) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(hostname)})]) left_token: <Left_CommandSub "$("> spids: [207 209] ) } spids: [206] ) ] spids: [206] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$HOSTNAME"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [-1 224] ) ] else_action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(4)})] spids: [232 240] ) ] spids: [203] ) spids: [198 202] ) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list:[{(start)}{(DQ )}] action:[(C {(do_start)})] spids:[254258264-1]) (case_arm pat_list: [{(restart)} {(reload)} {(force-reload)}] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Error: argument '") ($ VSub_Number "$1") ("' not supported"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[283])] ) (C {(exit)} {(3)}) ] spids: [267 272 292 -1] ) (case_arm pat_list:[{(stop)}] spids:[295296303-1]) (case_arm pat_list: [{(status)}] action: [(C {(do_status)}) (C {(exit)} {($ VSub_QMark "$?")})] spids: [306 307 318 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Usage: hostname.sh [start|stop]"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[331])] ) (C {(exit)} {(3)}) ] spids: [321 322 340 -1] ) ] spids: [245 251 342] ) (C {(Lit_Other ":")}) ] )