(command.CommandList children: [ (command.ShAssignment left: <Id.Lit_VarLike 'PATH='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'PATH='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH) op: assign_op.Equal rhs: {<'/sbin'> <Id.Lit_Colon ':'> <'/bin'>} ) ] redirects: [] ) (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {<'/lib/init/vars.sh'>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {<'/lib/lsb/init-functions'>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <do_start> name: do_start body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [{<Id.Lit_LBracket '['>} {<-f>} {<'/etc/hostname'>} {<Id.Lit_RBracket ']'>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'HOSTNAME='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'HOSTNAME='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME) op: assign_op.Equal rhs: { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>} {<'/etc/hostname'>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) ] ops: [<Id.Op_DAmp _>] ) (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName HOSTNAME))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'HOSTNAME='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'HOSTNAME='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME) op: assign_op.Equal rhs: { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <hostname> more_env: [] words: [{<hostname>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) ] ops: [<Id.Op_DAmp _>] ) (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName HOSTNAME))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'HOSTNAME='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'HOSTNAME='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME) op: assign_op.Equal rhs: {<localhost>} ) ] redirects: [] ) ] ops: [<Id.Op_DAmp _>] ) (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName VERBOSE))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_action_begin_msg> more_env: [] words: [ {<log_action_begin_msg>} {(DQ <'Setting hostname to \''> ($ Id.VSub_DollarName HOSTNAME) <'\''>)} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DAmp _>] ) (command.Simple blame_tok: <hostname> more_env: [] words: [{<hostname>} {(DQ ($ Id.VSub_DollarName HOSTNAME))}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'ES='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'ES='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ES='> name:ES) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} ) ] redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName VERBOSE))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_action_end_msg> more_env: [] words: [{<log_action_end_msg>} {($ Id.VSub_DollarName ES)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DAmp _>] ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName ES)} ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <do_status> name: do_status body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'HOSTNAME='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'HOSTNAME='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <hostname> more_env: [] words: [{<hostname>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName HOSTNAME))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})] spids: [212 224] ) ] else_kw: <Id.KW_Else else> else_action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<4>})] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Number 1))}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <start> pattern: (pat.Words words:[{<start>} {(DQ )}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <do_start> more_env: [] words: [{<do_start>}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <restart> pattern: (pat.Words words:[{<restart>} {<reload>} {<force-reload>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Error: argument \''> ($ Id.VSub_Number 1) <'\' not supported'>)}] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] right: <Id.Op_DSemi _> ) (CaseArm left: <stop> pattern: (pat.Words words:[{<stop>}]) middle: <Id.Right_CasePat _> action: [] right: <Id.Op_DSemi _> ) (CaseArm left: <status> pattern: (pat.Words words:[{<status>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <do_status> more_env: [] words: [{<do_status>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_QMark '?')} ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_Star '*'> pattern: (pat.Words words:[{<Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Usage: hostname.sh [start|stop]'>)}] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.Simple blame_tok: <Id.Lit_Colon ':'> more_env: [] words: [{<Id.Lit_Colon ':'>}] redirects: [] do_fork: T ) ] )