(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH)
          op: assign_op.Equal
          rhs: {<'/sbin'> <Id.Lit_Colon ':'> <'/bin'>}
          spids: [46]
        )
      ]
      redirects: []
    )
    (C {<.>} {<'/lib/init/vars.sh'>})
    (C {<.>} {<'/lib/lsb/init-functions'>})
    (command.ShFunction
      name: do_start
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-f>} {<'/etc/hostname'>} {<Id.Lit_RBracket ']'>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              child: (C {<cat>} {<'/etc/hostname'>})
                              right: <Id.Eof_RParen _>
                            )
                          )
                        }
                      spids: [79]
                    )
                  ]
                  redirects: []
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName HOSTNAME))} 
                  {<Id.Lit_RBracket ']'>}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: <Id.Left_DollarParen '$('>
                              child: (C {<hostname>})
                              right: <Id.Eof_RParen _>
                            )
                          )
                        }
                      spids: [106]
                    )
                  ]
                  redirects: []
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName HOSTNAME))} 
                  {<Id.Lit_RBracket ']'>}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME)
                      op: assign_op.Equal
                      rhs: {<localhost>}
                      spids: [131]
                    )
                  ]
                  redirects: []
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName VERBOSE))} 
                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>}
                )
                (C {<log_action_begin_msg>} 
                  {(DQ <'Setting hostname to \''> ($ Id.VSub_DollarName HOSTNAME) <'\''>)}
                )
              ]
            )
            (C {<hostname>} {(DQ ($ Id.VSub_DollarName HOSTNAME))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ES='> name:ES)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [167]
                )
              ]
              redirects: []
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName VERBOSE))} 
                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>}
                )
                (C {<log_action_end_msg>} {($ Id.VSub_DollarName ES)})
              ]
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName ES)}
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: do_status
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOSTNAME='> name:HOSTNAME)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<hostname>})
                        right: <Id.Eof_RParen _>
                      )
                    }
                  spids: [206]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName HOSTNAME))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [212 224]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<4>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number 1))}
      arms: [
        (case_arm
          pat_list: [{<start>} {(DQ )}]
          action: [(C {<do_start>})]
          spids: [254 258 264 -1]
        )
        (case_arm
          pat_list: [{<restart>} {<reload>} {<force-reload>}]
          action: [
            (command.Simple
              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>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>})
          ]
          spids: [267 272 292 -1]
        )
        (case_arm pat_list:[{<stop>}] action:[] spids:[295 296 303 -1])
        (case_arm
          pat_list: [{<status>}]
          action: [
            (C {<do_status>})
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_QMark '?')}
            )
          ]
          spids: [306 307 318 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'Usage: hostname.sh [start|stop]'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>})
          ]
          spids: [321 322 340 -1]
        )
      ]
      redirects: []
    )
    (C {<Id.Lit_Colon ':'>})
  ]
)