(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CMD='> name:CMD)
          op: assign_op.Equal
          rhs: {<'/usr/sbin/iiboot'>}
          spids: [72]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'IIADM='> name:IIADM)
          op: assign_op.Equal
          rhs: {<'/usr/sbin/iiadm'>}
          spids: [75]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SVCS='> name:SVCS)
          op: assign_op.Equal
          rhs: {<'/usr/bin/svcs'>}
          spids: [78]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DSCFG_DEPEND_NOCHK='> name:DSCFG_DEPEND_NOCHK)
          op: assign_op.Equal
          rhs: {(DQ <'/tmp/.dscfgadm_pid'>)}
          spids: [81]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OS_MINOR='> name:OS_MINOR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<'/usr/bin/uname'>} {<-r>})
                      (C {<'/usr/bin/cut'>} {<-d>} {(SQ <.>)} {<-f2>})
                    ]
                    negated: F
                    stderr_indices: []
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [86]
        )
      ]
      redirects: []
    )
    (C {<.>} {<'/lib/svc/share/smf_include.sh'>})
    (command.ShFunction
      name: do_smf_depends
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'times='> name:times)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [130]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [134]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName OS_MINOR)} {<-ge>} {<11>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [140 153]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ForEach
                      iter_names: [pid]
                      iterable: 
                        (for_iter.Words
                          words: [
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: (C {<pgrep>} {<dscfgadm>})
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          ]
                        )
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} 
                                          {
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              child: 
                                                (C {<grep>} {<-c>} {($ Id.VSub_DollarName pid)} 
                                                  {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)}
                                                )
                                              right: <Id.Backtick_Right '`'>
                                            )
                                          } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<0>}
                                    )
                                  ]
                                  spids: [193 216]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                  ]
                  spids: [161 172]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} 
                          {
                            (command_sub
                              left_token: <Id.Left_Backtick '`'>
                              child: 
                                (command.Pipeline
                                  children: [
                                    (C {<ps>} {<-ef>})
                                    (C {<grep>} {<preremove>})
                                    (C {<grep>} {<-c>} {<SUNWiiu>})
                                  ]
                                  negated: F
                                  stderr_indices: []
                                )
                              right: <Id.Backtick_Right '`'>
                            )
                          } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [230 263]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName count)} {<-ne>} {<0>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [
                                          {($ Id.VSub_DollarName SVCS)}
                                          {<-o>}
                                          {<STATE>}
                                          {<-D>}
                                          {($ Id.VSub_Number 1)}
                                        ]
                                        redirects: [
                                          (redir
                                            op: <Id.Redir_DGreat '2>>'>
                                            loc: (redir_loc.Fd fd:2)
                                            arg: {<'/dev/null'>}
                                          )
                                        ]
                                        more_env: []
                                        do_fork: T
                                      )
                                      (C {<grep>} {(DQ <'^online'>)})
                                      (C {<wc>} {<-l>})
                                    ]
                                    negated: F
                                    stderr_indices: []
                                  )
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [292]
                        )
                      ]
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName count)} {<-ne>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName times)} 
                                          {<-eq>} {<1>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<echo>} 
                                      {
                                        (DQ <'Waiting for '> ($ Id.VSub_Number 1) 
                                          <' dependents to be \'offline\''>
                                        )
                                      }
                                    )
                                    (command.Pipeline
                                      children: [
                                        (command.Simple
                                          words: [
                                            {($ Id.VSub_DollarName SVCS)}
                                            {<-D>}
                                            {($ Id.VSub_Number 1)}
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_DGreat '2>>'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<'/dev/null'>}
                                            )
                                          ]
                                          more_env: []
                                          do_fork: T
                                        )
                                        (C {<grep>} {(DQ <'^online'>)})
                                      ]
                                      negated: F
                                      stderr_indices: []
                                    )
                                  ]
                                  spids: [349 362]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName times)} 
                                          {<-eq>} {<60>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<echo>} 
                                      {
                                        (DQ <'Error: Failed waiting for '> ($ Id.VSub_Number 1) 
                                          <' dependents to be \'offline\''>
                                        )
                                      }
                                    )
                                    (command.Pipeline
                                      children: [
                                        (command.Simple
                                          words: [
                                            {($ Id.VSub_DollarName SVCS)}
                                            {<-D>}
                                            {($ Id.VSub_Number 1)}
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_DGreat '2>>'>
                                              loc: (redir_loc.Fd fd:2)
                                              arg: {<'/dev/null'>}
                                            )
                                          ]
                                          more_env: []
                                          do_fork: T
                                        )
                                        (C {<grep>} {(DQ <'^online'>)})
                                      ]
                                      negated: F
                                      stderr_indices: []
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Exit exit>
                                      arg_word: {($ Id.VSub_DollarName SMF_EXIT_ERR_FATAL)}
                                    )
                                  ]
                                  spids: [404 417]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                            (C {<sleep>} {<5>})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'times='> name:times)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: 
                                          (C {<expr>} {($ Id.VSub_DollarName times)} 
                                            {<Id.Lit_Other '+'>} {<1>}
                                          )
                                        right: <Id.Backtick_Right '`'>
                                      )
                                    }
                                  spids: [469]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [325 338]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CLINFO='> name:CLINFO)
          op: assign_op.Equal
          rhs: {<'/usr/sbin/clinfo'>}
          spids: [497]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [501]
        )
      ]
      redirects: []
    )
    (command.Case
      to_match: {($ Id.VSub_Number 1)}
      arms: [
        (case_arm
          pat_list: [{(SQ <start>)}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT)
                  op: assign_op.Equal
                  rhs: (rhs_word.Empty)
                  spids: [518]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<-x>} {(${ Id.VSub_Name CMD)} {<Id.Lit_RBracket ']'>})
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: (condition.Shell commands:[(C {(${ Id.VSub_Name CLINFO)})])
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT)
                                  op: assign_op.Equal
                                  rhs: {(DQ <'-C -'>)}
                                  spids: [552]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [538 545]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.Simple
                      words: [{(${ Id.VSub_Name CMD)} {($ Id.VSub_DollarName COPT)} {<-r>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      more_env: []
                      do_fork: T
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_QMark '?')}
                          spids: [578]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [522 535]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          spids: [511 514 585 -1]
        )
        (case_arm
          pat_list: [{(SQ <stop>)}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} {<'/dev/ii'>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {($ Id.VSub_DollarName SMF_EXIT_OK)}
                    )
                  ]
                  spids: [593 606]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<do_smf_depends>} {(DQ <'system/nws_ii'>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT)
                  op: assign_op.Equal
                  rhs: (rhs_word.Empty)
                  spids: [626]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<-x>} {(${ Id.VSub_Name CMD)} {<Id.Lit_RBracket ']'>})
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: (condition.Shell commands:[(C {(${ Id.VSub_Name CLINFO)})])
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT)
                                  op: assign_op.Equal
                                  rhs: {(DQ <'-C -'>)}
                                  spids: [660]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [646 653]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.Simple
                      words: [{(${ Id.VSub_Name CMD)} {($ Id.VSub_DollarName COPT)} {<-s>}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      more_env: []
                      do_fork: T
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_QMark '?')}
                          spids: [686]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [630 643]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          spids: [587 590 693 -1]
        )
        (case_arm
          pat_list: [{<Id.Lit_Star '*'>}]
          action: [
            (C {<echo>} {(DQ <'usage: /etc/init.d/ii {start|stop} '>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [695 696 711 -1]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName rc)} {<-ne>} {<0>} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.ControlFlow
              token: <Id.ControlFlow_Exit exit>
              arg_word: {($ Id.VSub_DollarName SMF_MON_OFFLINE)}
            )
          ]
          spids: [715 727]
        )
      ]
      else_action: [
        (command.ControlFlow
          token: <Id.ControlFlow_Exit exit>
          arg_word: {($ Id.VSub_DollarName SMF_EXIT_OK)}
        )
      ]
      redirects: []
    )
  ]
)