(command.CommandList
  children: [
    (C {<typeset>} {<-r>} 
      {<Id.Lit_VarLike 'PROG='> 
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: (C {<basename>} {($ Id.VSub_Number 0)})
          right: <Id.Eof_RParen _>
        )
      }
    )
    (C {<typeset>} {<-r>} {<Id.Lit_VarLike 'CTAG_NULL='> (DQ <->)})
    (command.ShFunction
      name: help
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<cluster_configured>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'CLUSTER_CONFIGURED='>
                      name: CLUSTER_CONFIGURED
                    )
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [117]
                )
              ]
              redirects: []
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'usage:\n'> <'\t'> ($ Id.VSub_DollarName PROG) <'\n'> <'\t'> 
                    ($ Id.VSub_DollarName PROG) <' -i\n'> <'\t'> ($ Id.VSub_DollarName PROG) <' -e [-r][-p]\n'> <'\t'> ($ Id.VSub_DollarName PROG) 
                    <' -d [-r]'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName CLUSTER_CONFIGURED)} 
                              {<-eq>} {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'\t'> ($ Id.VSub_DollarName PROG) <' -s'>)}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                  ]
                  spids: [145 158]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'\t-i\t: display information on the Availability Suite services\n'> 
                    <'\t-e\t: enable Availability Suite services (all, by default)\n'> <'\t-d\t: disable Availability Suite services (all, by default)\n'> 
                    <'\t-r\t: enable/disable Remote Mirror\n'> <'\t-p\t: enable Point in Time Copy'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName CLUSTER_CONFIGURED)} 
                              {<-eq>} {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [
                        {<echo>}
                        {(DQ <'\t-s\t: set the location of the cluster configuration database'>)}
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                  ]
                  spids: [193 206]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'\t-x\t: turn on script debugging (may be used with any valid option)\n'> 
                    <'\n'> <'\t When executed with no options or with nothing but -x, '> ($ Id.VSub_DollarName PROG) 
                    <' runs in\n'> <'\t interactive fashion, allowing the user to initialize the local (and\n'> 
                    <'\t if applicable, the cluster) configuration database, and to start the\n'> <'\t Availability Suite services.'>
                  )
                }
              ]
              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:{<2>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PKG_INSTALL_ROOT='> name:PKG_INSTALL_ROOT)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [256]
        )
      ]
      redirects: []
    )
    (C {<export>} {<PKG_INSTALL_ROOT>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LD_LIBRARY_PATH='> name:LD_LIBRARY_PATH)
          op: assign_op.Equal
          rhs: {<'/usr/lib'> <Id.Lit_Colon ':'> <'/usr/lib'>}
          spids: [268]
        )
      ]
      redirects: []
    )
    (C {<export>} {<LD_LIBRARY_PATH>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DSCFG='> name:DSCFG)
          op: assign_op.Equal
          rhs: {(DQ <'/usr/sbin/dscfg'>)}
          spids: [281]
        )
      ]
      redirects: []
    )
    (C {<export>} {<DSCFG>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PCONFIG='> name:PCONFIG)
          op: assign_op.Equal
          rhs: {(DQ <'/etc/dscfg_format'>)}
          spids: [294]
        )
      ]
      redirects: []
    )
    (C {<export>} {<PCONFIG>})
    (C {<export>} {<Id.Lit_VarLike 'LOCAL_DSCFG='> (DQ <'/etc/dscfg_local'>)})
    (C {<export>} {<Id.Lit_VarLike 'CLUSTER_REF='> (DQ <'/etc/dscfg_cluster'>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FS_LOCAL_SVC='> name:FS_LOCAL_SVC)
          op: assign_op.Equal
          rhs: {(DQ <'svc:/system/filesystem/local'>)}
          spids: [329]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NODELIST='> name:NODELIST)
          op: assign_op.Equal
          rhs: {(DQ <'/tmp/nodelist'>)}
          spids: [335]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DSCFGLOCKDCF='> name:DSCFGLOCKDCF)
          op: assign_op.Equal
          rhs: {(DQ <'/etc/dscfg_lockdb'>)}
          spids: [340]
        )
      ]
      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: [345]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MANIFEST_PATH='> name:MANIFEST_PATH)
          op: assign_op.Equal
          rhs: {<'/lib/svc/manifest/system'>}
          spids: [354]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SMF_ENABLE='> name:SMF_ENABLE)
          op: assign_op.Equal
          rhs: {(DQ <'nws_scm nws_sv nws_ii nws_rdc nws_rdcsyncd'>)}
          spids: [361]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SMF_DISABLE='> name:SMF_DISABLE)
          op: assign_op.Equal
          rhs: {(DQ <'nws_rdcsyncd nws_rdc nws_ii nws_sv nws_scm'>)}
          spids: [366]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nws_scm_enabled='> name:nws_scm_enabled)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [375]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nws_sv_enabled='> name:nws_sv_enabled)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [378]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nws_ii_enabled='> name:nws_ii_enabled)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [381]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nws_rdc_enabled='> name:nws_rdc_enabled)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [384]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: 
            (sh_lhs_expr.Name
              left: <Id.Lit_VarLike 'nws_rdcsyncd_enabled='>
              name: nws_rdcsyncd_enabled
            )
          op: assign_op.Equal
          rhs: {<0>}
          spids: [387]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH)
          op: assign_op.Equal
          rhs: {<'/usr/bin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/sbin/sh'>}
          spids: [394]
        )
      ]
      redirects: []
    )
    (C {<export>} {<PATH>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ARCH='> name:ARCH)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<uname>} {<-p>})
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [409]
        )
      ]
      redirects: []
    )
    (C {<export>} {<ARCH>})
    (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 {<uname>} {<-r>}) (C {<cut>} {<-d>} {(SQ <.>)} {<-f2>})]
                    negated: F
                    stderr_indices: []
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
          spids: [422]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REQUIRED='> name:REQUIRED)
          op: assign_op.Equal
          rhs: {<11264>}
          spids: [450]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'VALID_DB_ENTERED='> name:VALID_DB_ENTERED)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [457]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NO_ARGS='> name:NO_ARGS)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [461]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'xopt='> name:xopt)
          op: assign_op.Equal
          rhs: (rhs_word.Empty)
          spids: [468]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CLUST_LOC_MESS='> name:CLUST_LOC_MESS)
          op: assign_op.Equal
          rhs: 
            {
              (DQ <'The current location is invalid for a Sun StorageTek '> 
                <'Data Services configuration database.  Once a valid location is '> <'entered (raw slice on '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <did> 
                (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <' device), you may upgrade the existing '> 
                <'database to this new location - following the procedure outlined '> <'in the Installation and Configuration Guide.'>
              )
            }
          spids: [474]
        )
      ]
      redirects: []
    )
    (command.ShFunction
      name: error
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.Simple
              words: [{<echo>}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'INSTALLATION ERROR'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<echo>} {(DQ <'Error: '> ($ Id.VSub_Number 1))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<echo>}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (C {<in_cluster>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-eq>} {<1>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'GENERAL INSTALLATION RULES:'>)}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <Id.Lit_BadBackslash '\\'> <'tBecause you are installing on a cluster,'>)
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                    (command.Simple
                      words: [
                        {<echo>}
                        {
                          (DQ <Id.Lit_BadBackslash '\\'> 
                            <'tthe database must be located on a raw slice of a did device.'>
                          )
                        }
                      ]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                    (command.Simple
                      words: [{<echo>} {(DQ <Id.Lit_BadBackslash '\\'> <'t  e.g. /dev/did/rdsk/d17s1'>)}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                  ]
                  spids: [555 568]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MB='> name:MB)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (C {<expr>} {($ Id.VSub_DollarName REQUIRED)} {<'/'>} {<2>} {<'/'>} {<1024>})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [620]
                )
              ]
              redirects: []
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <Id.Lit_BadBackslash '\\'> <t> ($ Id.VSub_DollarName REQUIRED) <' sectors ('> 
                    ($ Id.VSub_DollarName MB) <' MBs) are required for the database.'>
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: get_system_state
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<valid_local_dscfg_exists>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'VALID_LOCAL_DB='> name:VALID_LOCAL_DB)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [680]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'OLD_VALID_LOCAL_DB='>
                      name: OLD_VALID_LOCAL_DB
                    )
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName VALID_LOCAL_DB)}
                  spids: [684]
                )
              ]
              redirects: []
            )
            (C {<in_cluster>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'IN_CLUSTER='> name:IN_CLUSTER)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [692]
                )
              ]
              redirects: []
            )
            (C {<cluster_configured>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'CLUSTER_CONFIGURED='>
                      name: CLUSTER_CONFIGURED
                    )
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [700]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName IN_CLUSTER)} 
                              {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<valid_cluster_dscfg_exists>})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'VALID_CLUSTER_DB='>
                              name: VALID_CLUSTER_DB
                            )
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_QMark '?')}
                          spids: [724]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'OLD_VALID_CLUSTER_DB='>
                              name: OLD_VALID_CLUSTER_DB
                            )
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName VALID_CLUSTER_DB)}
                          spids: [728]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [705 718]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: 
                        (sh_lhs_expr.Name
                          left: <Id.Lit_VarLike 'VALID_CLUSTER_DB='>
                          name: VALID_CLUSTER_DB
                        )
                      op: assign_op.Equal
                      rhs: {<0>}
                      spids: [735]
                    )
                  ]
                  redirects: []
                )
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: in_cluster
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/sbin/clinfo'>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<clinfo>})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-eq>} {<0>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [781 794]
                        )
                      ]
                      else_action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [764 775]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: cluster_configured
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-f>} {<'/etc/cluster/nodeid'>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [846 857]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: check_device_groups
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName VALID_CLUSTER_DB)} 
                              {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'DEVICE_GROUPS='>
                              name: DEVICE_GROUPS
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (command.Pipeline
                                    children: [
                                      (command.Simple
                                        words: [
                                          {($ Id.VSub_DollarName DSCFG)}
                                          {<-s>}
                                          {($ Id.VSub_DollarName FILE_LOC)}
                                          {<-l>}
                                        ]
                                        redirects: [
                                          (redir
                                            op: <Id.Redir_Great '2>'>
                                            loc: (redir_loc.Fd fd:2)
                                            arg: {<'/dev/null'>}
                                          )
                                        ]
                                        more_env: []
                                        do_fork: T
                                      )
                                      (C {<grep>} {(DQ <'^dsvol:'>)})
                                      (C {<cut>} {<-d> (SQ <' '>)} {<-f3>})
                                      (C {<sort>})
                                      (C {<uniq>})
                                      (C {<xargs>})
                                    ]
                                    negated: F
                                    stderr_indices: []
                                  )
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [918]
                        )
                      ]
                      redirects: []
                    )
                    (command.ForEach
                      iter_names: [x]
                      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName DEVICE_GROUPS)}])
                      body: 
                        (command.DoGroup
                          children: [
                            (command.Simple
                              words: [{($ Id.VSub_DollarName DSCFG)} {<-D>} {($ Id.VSub_DollarName x)}]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '2>'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              more_env: []
                              do_fork: T
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-eq>} {<1>} 
                                          {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'IN_USE='>
                                              name: IN_USE
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ ($ Id.VSub_DollarName IN_USE) <' '> 
                                                ($ Id.VSub_DollarName x)
                                              )
                                            }
                                          spids: [1009]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [993 1006]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName IN_USE))} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (C {<print>} {(DQ <'The following Sun Cluster device groups are in use '>)})
                            (C {<print>} {(DQ <'by Availability Suite on this node.'>)})
                            (C {<print>} {(DQ )})
                            (C {<print>} {(DQ ($ Id.VSub_DollarName IN_USE))})
                            (C {<print>} {(DQ )})
                            (C {<print>} 
                              {(DQ <'\'scswitch\' them to another Sun Cluster node before '>)}
                            )
                            (C {<print>} {(DQ <'attempting to disable any data services.'>)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [1024 1037]
                        )
                      ]
                      else_action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [901 915]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: is_did_device
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DID='> name:DID)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_Number 1)})
                              (C {<awk>} {<'-F/'>} {(SQ <'{print $3}'>)})
                            ]
                            negated: F
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [1135]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RDSK='> name:RDSK)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_Number 1)})
                              (C {<awk>} {<'-F/'>} {(SQ <'{print $4}'>)})
                            ]
                            negated: F
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [1155]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {(DQ <did>)} {<Id.Lit_Equals '='>} 
                              {($ Id.VSub_DollarName DID)} {<-a>} {(DQ <rdsk>)} {<Id.Lit_Equals '='>} {($ Id.VSub_DollarName RDSK)} {<-a>} {<-c>} 
                              {($ Id.VSub_Number 1)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [1176 1207]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: check_size
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SLICE='> name:SLICE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} {($ Id.VSub_Number 1)})
                              (C {<sed>} {<-n>} {(SQ <'s/.*d.*s\\(.*\\)/\\1/p'>)})
                            ]
                            negated: F
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [1253]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SECTORS='> name:SECTORS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<prtvtoc>} {($ Id.VSub_Number 1)})
                              (C {<tr>} {<-s>} {(SQ <' '>)})
                              (C {<grep>} {(DQ <'^ '> ($ Id.VSub_DollarName SLICE) <' '>)})
                              (C {<awk>} {(SQ <'{print $5}'>)})
                            ]
                            negated: F
                            stderr_indices: []
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [1280]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName SECTORS))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(DQ <'SLICE at '> ($ Id.VSub_Number 1) <' not found on this device'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [1318 1331]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName REQUIRED)} {<-gt>} 
                              {($ Id.VSub_DollarName SECTORS)} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1356 1369]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: valid_cluster_dscfg_exists
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-s>} {($ Id.VSub_DollarName CLUSTER_REF)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FILE_LOC='> name:FILE_LOC)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: (C {<head>} {<-1>} {($ Id.VSub_DollarName CLUSTER_REF)})
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [1424]
                        )
                      ]
                      redirects: []
                    )
                    (C {<contains_data>} {($ Id.VSub_DollarName FILE_LOC)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {($ Id.VSub_QMark '?')}
                    )
                  ]
                  spids: [1410 1421]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: valid_local_dscfg_exists
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-s>} {($ Id.VSub_DollarName LOCAL_DSCFG)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<contains_data>} {($ Id.VSub_DollarName LOCAL_DSCFG)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {($ Id.VSub_QMark '?')}
                    )
                  ]
                  spids: [1480 1491]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: contains_data
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName ARCH)} {<Id.Lit_Equals '='>} 
                          {(DQ <sparc>)} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'MAGIC_STRING='>
                              name: MAGIC_STRING
                            )
                          op: assign_op.Equal
                          rhs: {(DQ <MAGI>)}
                          spids: [1559]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1541 1556]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName ARCH)} {<Id.Lit_Equals '='>} 
                          {(DQ <i386>)} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'MAGIC_STRING='>
                              name: MAGIC_STRING
                            )
                          op: assign_op.Equal
                          rhs: {(DQ <IGAM>)}
                          spids: [1583]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1565 1580]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TMP_FILE='> name:TMP_FILE)
                  op: assign_op.Equal
                  rhs: {<'/tmp/'> ($ Id.VSub_Dollar '$')}
                  spids: [1597]
                )
              ]
              redirects: []
            )
            (command.ForEach
              iter_names: [offset]
              iterable: (for_iter.Words words:[{<0>} {<16>}])
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                                      {(DQ ($ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.Simple
                              words: [
                                {<dd>}
                                {<Id.Lit_VarLike 'if='> ($ Id.VSub_Number 1)}
                                {<Id.Lit_VarLike 'of='> ($ Id.VSub_DollarName TMP_FILE)}
                                {<Id.Lit_VarLike 'count='> <1>}
                                {<Id.Lit_VarLike 'iseek='> ($ Id.VSub_DollarName offset)}
                              ]
                              redirects: [
                                (redir
                                  op: <Id.Redir_Great '2>'>
                                  loc: (redir_loc.Fd fd:2)
                                  arg: {<'/dev/null'>}
                                )
                              ]
                              more_env: []
                              do_fork: T
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'FILECONTENTS='>
                                      name: FILECONTENTS
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: 
                                          (command.Pipeline
                                            children: [
                                              (C {<strings>} {($ Id.VSub_DollarName TMP_FILE)})
                                              (command.Simple
                                                words: [{<head>} {<-1>}]
                                                redirects: [
                                                  (redir
                                                    op: <Id.Redir_Great '2>'>
                                                    loc: (redir_loc.Fd fd:2)
                                                    arg: {<'/dev/null'>}
                                                  )
                                                ]
                                                more_env: []
                                                do_fork: T
                                              )
                                            ]
                                            negated: F
                                            stderr_indices: []
                                          )
                                        right: <Id.Backtick_Right '`'>
                                      )
                                    }
                                  spids: [1665]
                                )
                              ]
                              redirects: []
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} 
                                              {
                                                (command_sub
                                                  left_token: <Id.Left_Backtick '`'>
                                                  child: 
                                                    (command.Pipeline
                                                      children: [
                                                        (C {<echo>} 
                                                          {($ Id.VSub_DollarName FILECONTENTS)}
                                                        )
                                                        (C {<grep>} {<-c>} 
                                                          {(DQ ($ Id.VSub_DollarName MAGIC_STRING))}
                                                        )
                                                      ]
                                                      negated: F
                                                      stderr_indices: []
                                                    )
                                                  right: <Id.Backtick_Right '`'>
                                                )
                                              } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<rm>} {($ Id.VSub_DollarName TMP_FILE)})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [1684 1713]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                          spids: [1629 1644]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (C {<rm>} {($ Id.VSub_DollarName TMP_FILE)})
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: keep_it
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NOTE='> name:NOTE)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <Id.Lit_BadBackslash '\\'> 
                        <'nThe Sun StorageTek Data Services database configuration'>
                      )
                    }
                  spids: [1795]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NOTE='> name:NOTE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName NOTE) <' location has already been set.'>)}
                  spids: [1802]
                )
              ]
              redirects: []
            )
            (C {<echo>} {($ Id.VSub_DollarName NOTE)})
            (C {<echo>} 
              {
                (DQ <Id.Lit_BadBackslash '\\'> <'nCurrent location: '> 
                  ($ Id.VSub_DollarName PKG_INSTALL_ROOT) ($ Id.VSub_DollarName FILE_LOC)
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'QUEST='> name:QUEST)
                  op: assign_op.Equal
                  rhs: {(DQ <'Would you like to preserve the existing configuration'>)}
                  spids: [1826]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'QUEST='> name:QUEST)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName QUEST) <' information at its current location? '>)}
                  spids: [1832]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ANS='> name:ANS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<ckyorn>} {<-Qd>} {<n>} {<-p>} {(DQ ($ Id.VSub_DollarName QUEST))})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [1840]
                )
              ]
              redirects: []
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName ANS)}
              arms: [
                (case_arm
                  pat_list: [{<y>} {<Y>} {<yes>} {<YES>} {<Yes>}]
                  action: [
                    (C {<check_location>} {($ Id.VSub_DollarName FILE_LOC)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                      {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<error>} {(DQ ($ Id.VSub_DollarName CLUST_LOC_MESS))})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<0>}
                            )
                          ]
                          spids: [1895 1908]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'OLD_FILE_LOC='>
                                  name: OLD_FILE_LOC
                                )
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_DollarName FILE_LOC)}
                              spids: [1926]
                            )
                          ]
                          redirects: []
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FILE_LOC='> name:FILE_LOC)
                              op: assign_op.Equal
                              rhs: {($ Id.VSub_DollarName NULL)}
                              spids: [1930]
                            )
                          ]
                          redirects: []
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1866 1875 1942 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [1945 1946 1954 -1]
                )
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: preserve_overwrite_maybe
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<echo>} 
              {
                (DQ <Id.Lit_BadBackslash '\\'> 
                  <'nIt appears a valid database configuration exists here already.'>
                )
              }
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: (condition.Shell commands:[(C {<true>})])
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SAFE_LOC='> name:SAFE_LOC)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName FILE_LOC)}
                          spids: [2011]
                        )
                      ]
                      redirects: []
                    )
                    (C {<echo>} 
                      {
                        (DQ <Id.Lit_BadBackslash '\\'> 
                          <'nWould you like to preserve this information and continue?'>
                        )
                      }
                    )
                    (C {<echo>} 
                      {(DQ <Id.Lit_BadBackslash '\\'> <'ty - preserve current configuration'>)}
                    )
                    (C {<echo>} 
                      {(DQ <Id.Lit_BadBackslash '\\'> <'tn - overwrite with new configuration'>)}
                    )
                    (C {<echo>} 
                      {
                        (DQ <Id.Lit_BadBackslash '\\'> 
                          <'tmaybe - view contents of current configuration'>
                        )
                      }
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ANS='> name:ANS)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: (C {<ckkeywd>} {<-Q>} {<y>} {<n>} {<maybe>})
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [2049]
                        )
                      ]
                      redirects: []
                    )
                    (command.Case
                      to_match: {($ Id.VSub_DollarName ANS)}
                      arms: [
                        (case_arm
                          pat_list: [{<y>}]
                          action: [
                            (C {<check_location>} {($ Id.VSub_DollarName FILE_LOC)})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                              {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<error>} {(DQ ($ Id.VSub_DollarName CLUST_LOC_MESS))})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<0>}
                                    )
                                  ]
                                  spids: [2081 2094]
                                )
                              ]
                              else_action: [
                                (command.Simple
                                  words: [
                                    {($ Id.VSub_DollarName DSCFG)}
                                    {<-s>}
                                    {(DQ ($ Id.VSub_DollarName FILE_LOC))}
                                    {<-C>}
                                    {($ Id.VSub_DollarName CTAG_NULL)}
                                  ]
                                  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 'OLD_FILE_LOC='>
                                          name: OLD_FILE_LOC
                                        )
                                      op: assign_op.Equal
                                      rhs: {($ Id.VSub_DollarName FILE_LOC)}
                                      spids: [2131]
                                    )
                                  ]
                                  redirects: []
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'FILE_LOC='>
                                          name: FILE_LOC
                                        )
                                      op: assign_op.Equal
                                      rhs: {($ Id.VSub_DollarName NULL)}
                                      spids: [2135]
                                    )
                                  ]
                                  redirects: []
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [2072 2073 2147 -1]
                        )
                        (case_arm
                          pat_list: [{<n>}]
                          action: [
                            (C {<check_location>} {($ Id.VSub_DollarName FILE_LOC)})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                              {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<error>} {(DQ ($ Id.VSub_DollarName CLUST_LOC_MESS))})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<0>}
                                    )
                                  ]
                                  spids: [2159 2172]
                                )
                              ]
                              else_action: [
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [2150 2151 2198 -1]
                        )
                        (case_arm
                          pat_list: [{<maybe>}]
                          action: [
                            (C {<echo>} 
                              {
                                (DQ <Id.Lit_BadBackslash '\\'> 
                                  <'nContents of database configuration found at '> ($ Id.VSub_DollarName SAFE_LOC) <' are:'>
                                )
                              }
                            )
                            (command.Pipeline
                              children: [
                                (C {($ Id.VSub_DollarName DSCFG)} {<-l>} {<-s>} 
                                  {(DQ ($ Id.VSub_DollarName FILE_LOC))}
                                )
                                (C {<more>})
                              ]
                              negated: F
                              stderr_indices: []
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'FILE_LOC='>
                                      name: FILE_LOC
                                    )
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName SAFE_LOC)}
                                  spids: [2235]
                                )
                              ]
                              redirects: []
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Continue continue>
                            )
                          ]
                          spids: [2202 2203 2242 -1]
                        )
                      ]
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: get_location
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<echo>} 
              {
                (DQ <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> 
                  <'n----------ENTER DATABASE CONFIGURATION LOCATION-----------------'>
                )
              }
            )
            (C {<echo>} {(DQ <'Note:\t Please ensure this location meets all requirements specified'>)})
            (C {<echo>} {(DQ <'in the Availability Suite Installation Guide.'>)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FILE_LOC='> name:FILE_LOC)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<ckpath>} {<-artwQ>} {<-p>} {(DQ <'Enter location:'>)})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [2303]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} {<1>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})]
                  spids: [2319 2332]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<chmod>} {<666>} {($ Id.VSub_DollarName FILE_LOC)})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: check_location
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LOCATION='> name:LOCATION)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                  spids: [2394]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'did_clust_msg='> name:did_clust_msg)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'You are in cluster and '> ($ Id.VSub_DollarName LOCATION) 
                        <' is not valid DID device'>
                      )
                    }
                  spids: [2399]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SAFE_LOC='> name:SAFE_LOC)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_DollarName FILE_LOC)}
                  spids: [2425]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName IN_CLUSTER)} 
                              {<Id.Lit_Equals '='>} {<1>} {<-o>} {($ Id.VSub_DollarName CLUSTER_CONFIGURED)} {<Id.Lit_Equals '='>} {<1>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DPipe]
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} {<-b>} 
                                          {(DQ ($ Id.VSub_DollarName LOCATION))} {<Id.Lit_RBracket ']'>}
                                        )
                                        (C {<Id.Lit_LBracket '['>} {<-c>} 
                                          {(DQ ($ Id.VSub_DollarName LOCATION))} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<is_did_device>} {($ Id.VSub_DollarName LOCATION)})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                              {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<error>} {(DQ ($ Id.VSub_DollarName did_clust_msg))})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<0>}
                                    )
                                  ]
                                  spids: [2487 2500]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                          spids: [2454 2479]
                        )
                      ]
                      else_action: [
                        (C {<error>} {(DQ ($ Id.VSub_DollarName did_clust_msg))})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [2430 2451]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<echo>} {(DQ <'Location may not be changed in a non Sun Cluster OE.'>)}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})]
                  more_env: []
                  do_fork: T
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
              redirects: []
            )
            (C {<check_size>} {($ Id.VSub_DollarName LOCATION)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<error>} 
                      {
                        (DQ ($ Id.VSub_DollarName LOCATION) 
                          <' does not meet minimum space requirement.'>
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  spids: [2564 2578]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: ask_to_disable
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<echo>} 
              {
                (DQ <Id.Lit_BadBackslash '\\'> 
                  <'nYour services must be disabled before a new configuration location is set.'> <Id.Lit_BadBackslash '\\'> <n>
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'QUEST='> name:QUEST)
                  op: assign_op.Equal
                  rhs: {(DQ <'Would you like to disable the services now and continue with the'>)}
                  spids: [2648]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'QUEST='> name:QUEST)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_DollarName QUEST) <' Availability Suite setup? '>)}
                  spids: [2654]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ANS='> name:ANS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<ckyorn>} {<-Qd>} {<n>} {<-p>} {(DQ ($ Id.VSub_DollarName QUEST))})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [2663]
                )
              ]
              redirects: []
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName ANS)}
              arms: [
                (case_arm
                  pat_list: [{<y>} {<Y>} {<yes>} {<YES>} {<Yes>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [2689 2698 2706 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [2709 2710 2718 -1]
                )
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: ask_to_enable
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<echo>} 
              {
                (DQ <Id.Lit_BadBackslash '\\'> 
                  <
'nIf you would like to start using the Availability Suite immediately, you may\n'
                  > <'start the SMF services now.  You may also choose to start the services later\n'> <'using the '> 
                  ($ Id.VSub_DollarName PROG) <' -e command.'>
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'QUEST='> name:QUEST)
                  op: assign_op.Equal
                  rhs: {(DQ <'Would you like to start the services now? '>)}
                  spids: [2763]
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ANS='> name:ANS)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<ckyorn>} {<-Qd>} {<n>} {<-p>} {(DQ ($ Id.VSub_DollarName QUEST))})
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [2770]
                )
              ]
              redirects: []
            )
            (command.Case
              to_match: {($ Id.VSub_DollarName ANS)}
              arms: [
                (case_arm
                  pat_list: [{<y>} {<Y>} {<yes>} {<YES>} {<Yes>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [2796 2805 2813 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [2816 2817 2825 -1]
                )
              ]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: display_info
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<Id.Lit_VarLike 'grp_error_flg='> <0>})
            (C {<typeset>} {<-L15>} {<svc>} {<state>} {<en>} {<Id.Lit_VarLike 'SVC='> (DQ <SERVICE>)} 
              {<Id.Lit_VarLike 'STATE='> (DQ <STATE>)} {<Id.Lit_VarLike 'EN='> (DQ <ENABLED>)}
            )
            (C {<echo>} 
              {
                (DQ ($ Id.VSub_DollarName SVC) <Id.Lit_BadBackslash '\\'> <t> 
                  ($ Id.VSub_DollarName STATE) <Id.Lit_BadBackslash '\\'> <t> ($ Id.VSub_DollarName EN)
                )
              }
            )
            (command.ForEach
              iter_names: [i]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName SMF_ENABLE)}])
              body: 
                (command.DoGroup
                  children: [
                    (C {<is_imported>} {($ Id.VSub_DollarName i)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} 
                                  {<1>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'state='> name:state)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: 
                                          (C {<svcprop>} {<-c>} {<-p>} {<'restarter/state'>} 
                                            {<svc> <Id.Lit_Colon ':'> <'/system/'> (${ Id.VSub_Name i) 
                                              <Id.Lit_Colon ':'> <default>
                                            }
                                          )
                                        right: <Id.Backtick_Right '`'>
                                      )
                                    }
                                  spids: [2932]
                                )
                              ]
                              redirects: []
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'en='> name:en)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: 
                                          (C {<svcprop>} {<-c>} {<-p>} {<'general/enabled'>} 
                                            {<svc> <Id.Lit_Colon ':'> <'/system/'> (${ Id.VSub_Name i) 
                                              <Id.Lit_Colon ':'> <default>
                                            }
                                          )
                                        right: <Id.Backtick_Right '`'>
                                      )
                                    }
                                  spids: [2960]
                                )
                              ]
                              redirects: []
                            )
                            (C {<check_fs_local_grouping>} {($ Id.VSub_DollarName i)})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>} 
                                          {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'svc='>
                                              name: svc
                                            )
                                          op: assign_op.Equal
                                          rhs: {(DQ (${ Id.VSub_Name i) <'***'>)}
                                          spids: [3009]
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'grp_error_flg='>
                                              name: grp_error_flg
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (word_part.ArithSub
                                                anode: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Plus
                                                    left: ($ Id.Lit_ArithVarLike grp_error_flg)
                                                    right: {<Id.Lit_Digits 1>}
                                                  )
                                              )
                                            }
                                          spids: [3018]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [2993 3006]
                                )
                              ]
                              else_action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'svc='> name:svc)
                                      op: assign_op.Equal
                                      rhs: {($ Id.VSub_DollarName i)}
                                      spids: [3032]
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              redirects: []
                            )
                            (C {<echo>} 
                              {
                                (DQ ($ Id.VSub_DollarName svc) <Id.Lit_BadBackslash '\\'> <t> 
                                  ($ Id.VSub_DollarName state) <Id.Lit_BadBackslash '\\'> <t> ($ Id.VSub_DollarName en)
                                )
                              }
                            )
                          ]
                          spids: [2916 2929]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (C {<print>} {(DQ <Id.Lit_BadBackslash '\\'> <'nAvailability Suite Configuration:'>)})
            (C {<printf>} {(DQ <'Local configuration database: '>)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName VALID_LOCAL_DB)} 
                          {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(C {<print>} {(DQ <valid>)})]
                  spids: [3075 3088]
                )
              ]
              else_action: [(C {<print>} {(DQ <invalid>)})]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName CLUSTER_CONFIGURED)} 
                          {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<printf>} {(DQ <'cluster configuration database: '>)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName VALID_CLUSTER_DB)} 
                                  {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (C {<print>} {(DQ <valid>)})
                            (C {<print>} 
                              {(DQ <'cluster configuration location: '> (${ Id.VSub_Name FILE_LOC))}
                            )
                          ]
                          spids: [3137 3150]
                        )
                      ]
                      else_action: [(C {<print>} {(DQ <invalid>)})]
                      redirects: []
                    )
                  ]
                  spids: [3114 3127]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName grp_error_flg)} {<-gt>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<typeset>} {<p>})
                    (C {<typeset>} {<p_has>})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName grp_error_flg)} 
                                  {<-gt>} {<1>} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p='> name:p)
                                  op: assign_op.Equal
                                  rhs: {(DQ <s>)}
                                  spids: [3231]
                                )
                              ]
                              redirects: []
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p_has='> name:p_has)
                                  op: assign_op.Equal
                                  rhs: {(DQ <have>)}
                                  spids: [3237]
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [3215 3228]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p='> name:p)
                              op: assign_op.Equal
                              rhs: {(DQ )}
                              spids: [3246]
                            )
                          ]
                          redirects: []
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p_has='> name:p_has)
                              op: assign_op.Equal
                              rhs: {(DQ <has>)}
                              spids: [3251]
                            )
                          ]
                          redirects: []
                        )
                      ]
                      redirects: []
                    )
                    (C {<printf>} 
                      {
                        (DQ <Id.Lit_BadBackslash '\\'> <'n*** Warning: The service'> 
                          ($ Id.VSub_DollarName p) <' above '> ($ Id.VSub_DollarName p_has) <' an incorrect '>
                        )
                      }
                    )
                    (C {<printf>} {(DQ <'dependency.  To repair the'> <Id.Lit_BadBackslash '\\'> <n>)})
                    (C {<printf>} 
                      {
                        (DQ <'problem, run '> 
                          (word_part.EscapedLiteral
                            token: <Id.Lit_EscapedChar '\\"'>
                            ch: '"'
                          ) <dscfgadm> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <.> 
                          <Id.Lit_BadBackslash '\\'> <n>
                        )
                      }
                    )
                  ]
                  spids: [3189 3202]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: initialize_local_db
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<echo>} {(DQ <'Could not find a valid local configuration database.'>)})
            (C {<echo>} {(DQ <'Initializing local configuration database...'>)})
            (command.Pipeline
              children: [
                (C {<echo>} {<y>})
                (command.Simple
                  words: [{(${ Id.VSub_Name DSCFG)} {<-i>}]
                  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
                )
              ]
              negated: F
              stderr_indices: []
            )
            (command.Simple
              words: [{(${ Id.VSub_Name DSCFG)} {<-i>} {<-p>} {(${ Id.VSub_Name PCONFIG)}]
              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
            )
            (C {<valid_local_dscfg_exists>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'VALID_LOCAL_DB='> name:VALID_LOCAL_DB)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [3385]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName VALID_LOCAL_DB)} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'Unable to initialize local configuration database'>)}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3389 3403]
                )
              ]
              else_action: [
                (C {<echo>} {(DQ <'Successfully initialized local configuration database'>)})
              ]
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: initialize_cluster_db
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-n>} 
                          {(DQ ($ Id.VSub_DollarName FILE_LOC))} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [3466 3481]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<echo>} {(DQ <'Initializing cluster configuration database...'>)})
            (command.Simple
              words: [
                {(${ Id.VSub_Name DSCFG)}
                {<-s>}
                {(${ Id.VSub_Name FILE_LOC)}
                {<-C>}
                {($ Id.VSub_DollarName CTAG_NULL)}
              ]
              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.Pipeline
              children: [
                (C {<echo>} {<y>})
                (command.Simple
                  words: [{(${ Id.VSub_Name DSCFG)} {<-i>} {<-C>} {($ Id.VSub_DollarName CTAG_NULL)}]
                  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
                )
              ]
              negated: F
              stderr_indices: []
            )
            (command.Simple
              words: [
                {(${ Id.VSub_Name DSCFG)}
                {<-i>}
                {<-p>}
                {(${ Id.VSub_Name PCONFIG)}
                {<-C>}
                {($ Id.VSub_DollarName CTAG_NULL)}
              ]
              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
            )
            (C {<valid_cluster_dscfg_exists>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'VALID_CLUSTER_DB='>
                      name: VALID_CLUSTER_DB
                    )
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '?')}
                  spids: [3578]
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName VALID_CLUSTER_DB)} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.Simple
                      words: [{<echo>} {(DQ <'Unable to initialize cluster configuration database'>)}]
                      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      more_env: []
                      do_fork: T
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [3582 3596]
                )
              ]
              else_action: [
                (C {<echo>} {(DQ <'Successfully initialized cluster configuration database'>)})
              ]
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: set_cluster_config
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REPEAT='> name:REPEAT)
                  op: assign_op.Equal
                  rhs: {<0>}
                  spids: [3655]
                )
              ]
              redirects: []
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName REPEAT)} {<-eq>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {($ Id.VSub_DollarName VALID_DB_ENTERED)} {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'VALID_DB_ENTERED='>
                                      name: VALID_DB_ENTERED
                                    )
                                  op: assign_op.Equal
                                  rhs: {<0>}
                                  spids: [3703]
                                )
                              ]
                              redirects: []
                            )
                            (C {<preserve_overwrite_maybe>})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                              {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'REPEAT='>
                                              name: REPEAT
                                            )
                                          op: assign_op.Equal
                                          rhs: {<1>}
                                          spids: [3739]
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [3723 3736]
                                )
                              ]
                              else_action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'VALID_CLUSTER_DB='>
                                          name: VALID_CLUSTER_DB
                                        )
                                      op: assign_op.Equal
                                      rhs: {<0>}
                                      spids: [3749]
                                    )
                                  ]
                                  redirects: []
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Continue continue>
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [3682 3695]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {($ Id.VSub_DollarName VALID_CLUSTER_DB)} {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'SAFE_LOC='>
                                      name: SAFE_LOC
                                    )
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName FILE_LOC)}
                                  spids: [3783]
                                )
                              ]
                              redirects: []
                            )
                            (C {<keep_it>})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                              {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'PROMPT='>
                                              name: PROMPT
                                            )
                                          op: assign_op.Equal
                                          rhs: {<0>}
                                          spids: [3815]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [3799 3812]
                                )
                              ]
                              else_action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'PROMPT='>
                                          name: PROMPT
                                        )
                                      op: assign_op.Equal
                                      rhs: {<1>}
                                      spids: [3822]
                                    )
                                  ]
                                  redirects: []
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [3767 3780]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DPipe]
                                      children: [
                                        (C {<Id.Lit_LBracket '['>} 
                                          {($ Id.VSub_DollarName VALID_CLUSTER_DB)} {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                        )
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName PROMPT)} 
                                          {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<check_enabled>})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                          {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<show_enabled>})
                                    (C {<ask_to_disable>})
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                                  {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                                )
                                              ]
                                            )
                                          action: [
                                            (C {<echo>} 
                                              {(DQ <'A new configuration location was not set.'>)}
                                            )
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Exit exit>
                                              arg_word: {<1>}
                                            )
                                          ]
                                          spids: [3910 3923]
                                        )
                                      ]
                                      else_action: [
                                        (C {<disable_services>})
                                        (command.If
                                          arms: [
                                            (if_arm
                                              cond: 
                                                (condition.Shell
                                                  commands: [
                                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                                    )
                                                  ]
                                                )
                                              action: [
                                                (command.ControlFlow
                                                  token: <Id.ControlFlow_Exit exit>
                                                  arg_word: {<1>}
                                                )
                                              ]
                                              spids: [3944 3958]
                                            )
                                          ]
                                          else_action: []
                                          redirects: []
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [3888 3901]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                            (C {<get_location>})
                            (C {<contains_data>} {($ Id.VSub_DollarName FILE_LOC)})
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Sentence
                                          child: 
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                              {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                            )
                                          terminator: <Id.Op_Semi _>
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'VALID_DB_ENTERED='>
                                              name: VALID_DB_ENTERED
                                            )
                                          op: assign_op.Equal
                                          rhs: {<1>}
                                          spids: [4013]
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Continue continue>
                                    )
                                  ]
                                  spids: [3997 4010]
                                )
                              ]
                              else_action: [
                                (C {<check_location>} {($ Id.VSub_DollarName FILE_LOC)})
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                                  {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      action: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: 
                                                (sh_lhs_expr.Name
                                                  left: <Id.Lit_VarLike 'VALID_CLUSTER_DB='>
                                                  name: VALID_CLUSTER_DB
                                                )
                                              op: assign_op.Equal
                                              rhs: {<0>}
                                              spids: [4053]
                                            )
                                          ]
                                          redirects: []
                                        )
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Continue continue>
                                        )
                                      ]
                                      spids: [4037 4050]
                                    )
                                  ]
                                  else_action: []
                                  redirects: []
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: 
                                        (sh_lhs_expr.Name
                                          left: <Id.Lit_VarLike 'REPEAT='>
                                          name: REPEAT
                                        )
                                      op: assign_op.Equal
                                      rhs: {<1>}
                                      spids: [4067]
                                    )
                                  ]
                                  redirects: []
                                )
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Continue continue>
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [3841 3866]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REPEAT='> name:REPEAT)
                              op: assign_op.Equal
                              rhs: {<1>}
                              spids: [4088]
                            )
                          ]
                          redirects: []
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Continue continue>
                        )
                      ]
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: check_enabled
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<Id.Lit_VarLike 'ret='> <0>})
            (C {<typeset>} {<svc>})
            (command.ForEach
              iter_names: [svc]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName SMF_ENABLE)}])
              body: 
                (command.DoGroup
                  children: [
                    (C {<is_enabled>} {($ Id.VSub_DollarName svc)})
                    (C {<eval>} 
                      {(${ Id.VSub_Name svc) <Id.Lit_VarLike '_enabled='> ($ Id.VSub_QMark '?')}
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ret='> name:ret)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Pipe
                                    left: ($ Id.Lit_ArithVarLike ret)
                                    right: {(${ Id.VSub_Name svc) <Id.Lit_ArithVarLike _enabled>}
                                  )
                              )
                            }
                          spids: [4167]
                        )
                      ]
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (command.ControlFlow
              token: <Id.ControlFlow_Return return>
              arg_word: {($ Id.VSub_DollarName ret)}
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: show_enabled
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<svc>})
            (C {<echo>} 
              {
                (DQ <Id.Lit_BadBackslash '\\'> 
                  <'nThe following Availability Suite services are enabled:'>
                )
              }
            )
            (command.ForEach
              iter_names: [svc]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName SMF_ENABLE)}])
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.DParen
                                  child: 
                                    (arith_expr.Binary
                                      op_id: Id.Arith_DEqual
                                      left: {(${ Id.VSub_Name svc) <Id.Lit_ArithVarLike _enabled>}
                                      right: {<Id.Lit_Digits 1>}
                                    )
                                  redirects: []
                                )
                              ]
                            )
                          action: [(C {<printf>} {(DQ ($ Id.VSub_DollarName svc) <' '>)})]
                          spids: [4238 4255]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (C {<echo>} {(DQ )})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: is_enabled
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<en>})
            (C {<is_imported>} {($ Id.VSub_Number 1)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} {<1>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'en='> name:en)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (C {<svcprop>} {<-c>} {<-p>} {<'general/enabled'>} 
                                    {<svc> <Id.Lit_Colon ':'> <'/system/'> (${ Id.VSub_Number 1) 
                                      <Id.Lit_Colon ':'> <default>
                                    }
                                  )
                                right: <Id.Backtick_Right '`'>
                              )
                            }
                          spids: [4334]
                        )
                      ]
                      redirects: []
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName en)} 
                                  {<Id.Lit_Equals '='>} {(DQ <true>)} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [4357 4372]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                  spids: [4318 4331]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: no_depend_check
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<pid>})
            (C {<typeset>} {<Id.Lit_VarLike 'msg='> <0>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName OS_MINOR)} {<-lt>} {<11>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pid='> name:pid)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: <Id.Left_Backtick '`'>
                                        child: (C {<cat>} {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)})
                                        right: <Id.Backtick_Right '`'>
                                      )
                                    }
                                  spids: [4458]
                                )
                              ]
                              redirects: []
                            )
                            (C {<echo>} {(DQ <'Another dscfgadm disable is in progress.'>)})
                            (C {<echo>} 
                              {
                                (DQ <'Waiting for pid: '> ($ Id.VSub_DollarName pid) 
                                  <' to terminate...'>
                                )
                              }
                            )
                            (command.WhileUntil
                              keyword: <Id.KW_While while>
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (C {<Id.Lit_LBracket '['>} {<-f>} 
                                      {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (command.DParen
                                                  child: 
                                                    (arith_expr.Binary
                                                      op_id: Id.Arith_DAmp
                                                      left: ($ Id.Lit_ArithVarLike msg)
                                                      right: 
                                                        (arith_expr.Binary
                                                          op_id: Id.Arith_DEqual
                                                          left: 
                                                            (arith_expr.Binary
                                                              op_id: Id.Arith_Percent
                                                              left: ($ Id.Lit_ArithVarLike msg)
                                                              right: {<Id.Lit_Digits 6>}
                                                            )
                                                          right: {<Id.Lit_Digits 0>}
                                                        )
                                                    )
                                                  redirects: []
                                                )
                                              ]
                                            )
                                          action: [
                                            (C {<printf>} 
                                              {
                                                (DQ <Id.Lit_BadBackslash '\\'> 
                                                  <'nAnother dscfgadm disable '>
                                                )
                                              }
                                            )
                                            (C {<printf>} 
                                              {
                                                (DQ <'(pid: '> ($ Id.VSub_DollarName pid) 
                                                  <') still appears to '>
                                                )
                                              }
                                            )
                                            (C {<printf>} 
                                              {
                                                (DQ <' be in progress.'> <Id.Lit_BadBackslash '\\'> <n>)
                                              }
                                            )
                                            (C {<printf>} {(DQ <'If this is not the case, you '>)})
                                            (C {<printf>} {(DQ <'may remove '>)})
                                            (C {<printf>} 
                                              {
                                                (DQ ($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK) <.> 
                                                  <Id.Lit_BadBackslash '\\'> <n>
                                                )
                                              }
                                            )
                                          ]
                                          spids: [4499 4522]
                                        )
                                      ]
                                      else_action: []
                                      redirects: []
                                    )
                                    (C {<sleep>} {<5>})
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'msg='>
                                              name: msg
                                            )
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (word_part.ArithSub
                                                anode: 
                                                  (arith_expr.Binary
                                                    op_id: Id.Arith_Plus
                                                    left: ($ Id.Lit_ArithVarLike msg)
                                                    right: {<Id.Lit_Digits 1>}
                                                  )
                                              )
                                            }
                                          spids: [4583]
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                )
                              redirects: []
                            )
                          ]
                          spids: [4444 4455]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (C {<touch>} {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)})
                    (command.Simple
                      words: [{<echo>} {($ Id.VSub_Dollar '$')}]
                      redirects: [
                        (redir
                          op: <Id.Redir_DGreat '>>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)}
                        )
                      ]
                      more_env: []
                      do_fork: T
                    )
                  ]
                  spids: [4428 4441]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: rm_no_depend_check
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName OS_MINOR)} {<-lt>} {<11>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(C {<rm>} {<-f>} {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)})]
                  spids: [4639 4652]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: set_fs_local_grouping
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<Id.Lit_VarLike 'svc='> ($ Id.VSub_Number 1)})
            (C {<typeset>} {<Id.Lit_VarLike 'dep_group='> ($ Id.VSub_Number 2)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName svc)} 
                              {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<nws_rdcsyncd>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<svccfg>} {<-s>} {($ Id.VSub_DollarName FS_LOCAL_SVC)} {<setprop>} 
                      {(${ Id.VSub_Name svc) <'-local-fs/grouping'> <Id.Lit_Equals '='> 
                        ($ Id.VSub_DollarName dep_group)
                      }
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (C {<printf>} 
                              {
                                (DQ <'command failed: svccfg -s '> ($ Id.VSub_DollarName FS_LOCAL_SVC) 
                                  <' '>
                                )
                              }
                            )
                            (C {<printf>} 
                              {
                                (DQ <'setprop '> (${ Id.VSub_Name svc) <'-local-fs/grouping='> 
                                  ($ Id.VSub_DollarName dep_group) <' '>
                                )
                              }
                            )
                            (C {<printf>} {(DQ <'>&2'> <Id.Lit_BadBackslash '\\'> <n>)})
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [4747 4760]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (C {<svcadm>} {<refresh>} 
                      {(${ Id.VSub_Name FS_LOCAL_SVC) <Id.Lit_Colon ':'> <default>}
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (C {<print>} 
                              {(DQ <'Failed to refresh '> (${ Id.VSub_Name FS_LOCAL_SVC) <' >&2'>)}
                            )
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [4818 4831]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                  spids: [4712 4726]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: check_fs_local_grouping
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<Id.Lit_VarLike 'svc='> ($ Id.VSub_Number 1)})
            (C {<typeset>} {<cur_grouping>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName svc)} {<Id.Lit_Equals '='>} 
                          {<nws_rdcsyncd>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [4919 4932]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<is_imported>} {($ Id.VSub_DollarName svc)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [4957 4970]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cur_grouping='> name:cur_grouping)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (C {<svcprop>} {<-c>} {<-p>} {(${ Id.VSub_Name svc) <'-local-fs/grouping'>} 
                            {($ Id.VSub_DollarName FS_LOCAL_SVC)}
                          )
                        right: <Id.Backtick_Right '`'>
                      )
                    }
                  spids: [4986]
                )
              ]
              redirects: []
            )
            (C {<is_enabled>} {($ Id.VSub_DollarName svc)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} {<1>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'CORRECT_GROUPING='>
                              name: CORRECT_GROUPING
                            )
                          op: assign_op.Equal
                          rhs: {(DQ <require_all>)}
                          spids: [5031]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [5015 5028]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: 
                        (sh_lhs_expr.Name
                          left: <Id.Lit_VarLike 'CORRECT_GROUPING='>
                          name: CORRECT_GROUPING
                        )
                      op: assign_op.Equal
                      rhs: {(DQ <optional_all>)}
                      spids: [5040]
                    )
                  ]
                  redirects: []
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName cur_grouping))} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName CORRECT_GROUPING))} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [5050 5068]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: svc_operation
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<Id.Lit_VarLike 'svc='> ($ Id.VSub_Number 1)})
            (C {<typeset>} {<Id.Lit_VarLike 'command='> ($ Id.VSub_Number 2)})
            (C {<typeset>} {<enable_state>})
            (C {<typeset>} {<dep_group>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName command)} 
                          {<Id.Lit_Equals '='>} {(DQ <disable>)} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'enable_state='>
                              name: enable_state
                            )
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [5178]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dep_group='> name:dep_group)
                          op: assign_op.Equal
                          rhs: {(DQ <optional_all>)}
                          spids: [5182]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [5160 5175]
                )
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName command)} 
                          {<Id.Lit_Equals '='>} {(DQ <enable>)} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'enable_state='>
                              name: enable_state
                            )
                          op: assign_op.Equal
                          rhs: {<0>}
                          spids: [5216]
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dep_group='> name:dep_group)
                          op: assign_op.Equal
                          rhs: {(DQ <require_all>)}
                          spids: [5220]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [5197 5212]
                )
              ]
              else_action: [
                (command.Simple
                  words: [{<echo>} {(DQ <'invalid command: '> ($ Id.VSub_DollarName command))}]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  more_env: []
                  do_fork: T
                )
              ]
              redirects: []
            )
            (C {<is_imported>} {($ Id.VSub_DollarName svc)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} {<1>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<is_enabled>} {($ Id.VSub_DollarName svc)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} 
                                  {($ Id.VSub_DollarName enable_state)} {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} 
                                          {($ Id.VSub_DollarName enable_state)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<set_fs_local_grouping>} {($ Id.VSub_DollarName svc)} 
                                      {($ Id.VSub_DollarName dep_group)}
                                    )
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                                  {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}
                                                )
                                              ]
                                            )
                                          action: [
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Return return>
                                              arg_word: {<1>}
                                            )
                                          ]
                                          spids: [5313 5326]
                                        )
                                      ]
                                      else_action: []
                                      redirects: []
                                    )
                                  ]
                                  spids: [5286 5299]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                            (C {<svcadm>} {($ Id.VSub_DollarName command)} {<-s>} 
                              {<svc> <Id.Lit_Colon ':'> <'/system/'> ($ Id.VSub_DollarName svc)}
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.Simple
                                      words: [
                                        {<echo>}
                                        {
                                          (DQ ($ Id.VSub_DollarName svc) <' failed to '> 
                                            ($ Id.VSub_DollarName command)
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_GreatAnd '>&'>
                                          loc: (redir_loc.Fd fd:1)
                                          arg: {<2>}
                                        )
                                      ]
                                      more_env: []
                                      do_fork: T
                                    )
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [5353 5367]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} 
                                          {($ Id.VSub_DollarName enable_state)} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<set_fs_local_grouping>} {($ Id.VSub_DollarName svc)} 
                                      {($ Id.VSub_DollarName dep_group)}
                                    )
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                                  {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}
                                                )
                                              ]
                                            )
                                          action: [
                                            (command.ControlFlow
                                              token: <Id.ControlFlow_Return return>
                                              arg_word: {<1>}
                                            )
                                          ]
                                          spids: [5418 5431]
                                        )
                                      ]
                                      else_action: []
                                      redirects: []
                                    )
                                  ]
                                  spids: [5391 5404]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                          spids: [5270 5283]
                        )
                      ]
                      else_action: [
                        (C {<echo>} 
                          {
                            (DQ ($ Id.VSub_DollarName svc) <' service already '> 
                              (${ Id.VSub_Name command) <'d... skipping'>
                            )
                          }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [5249 5262]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: enable_services
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<svc>})
            (C {<import_services>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Id.Arith_DEqual
                              left: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_Pipe
                                  left: ($ Id.Lit_ArithVarLike r_flag)
                                  right: ($ Id.Lit_ArithVarLike p_flag)
                                )
                              right: {<Id.Lit_Digits 0>}
                            )
                          redirects: []
                        )
                      ]
                    )
                  action: [
                    (command.ForEach
                      iter_names: [svc]
                      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName SMF_ENABLE)}])
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Pipeline
                                          children: [
                                            (C {<svc_operation>} {($ Id.VSub_DollarName svc)} {<enable>})
                                          ]
                                          negated: T
                                          stderr_indices: []
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [5662 5673]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                  ]
                  spids: [5627 5647]
                )
              ]
              else_action: [
                (C {<check_enabled>})
                (command.ForEach
                  iter_names: [svc]
                  iterable: (for_iter.Words words:[{<nws_scm>} {<nws_sv>}])
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (command.DParen
                                          child: 
                                            (arith_expr.Binary
                                              op_id: Id.Arith_DEqual
                                              left: 
                                                {(${ Id.VSub_Name svc) <Id.Lit_ArithVarLike _enabled>}
                                              right: {<Id.Lit_Digits 0>}
                                            )
                                          redirects: []
                                        )
                                        (command.Pipeline
                                          children: [
                                            (C {<svc_operation>} {($ Id.VSub_DollarName svc)} {<enable>})
                                          ]
                                          negated: T
                                          stderr_indices: []
                                        )
                                      ]
                                    )
                                  ]
                                )
                              action: [
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [5716 5745]
                            )
                          ]
                          else_action: []
                          redirects: []
                        )
                      ]
                    )
                  redirects: []
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.DParen
                              child: ($ Id.Lit_ArithVarLike p_flag)
                              redirects: []
                            )
                          ]
                        )
                      action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Pipeline
                                      children: [(C {<svc_operation>} {<nws_ii>} {<enable>})]
                                      negated: T
                                      stderr_indices: []
                                    )
                                  ]
                                )
                              action: [
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [5772 5783]
                            )
                          ]
                          else_action: []
                          redirects: []
                        )
                      ]
                      spids: [5761 5769]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.DParen
                              child: ($ Id.Lit_ArithVarLike r_flag)
                              redirects: []
                            )
                          ]
                        )
                      action: [
                        (command.ForEach
                          iter_names: [svc]
                          iterable: (for_iter.Words words:[{<nws_rdc>} {<nws_rdcsyncd>}])
                          body: 
                            (command.DoGroup
                              children: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Pipeline
                                              children: [
                                                (C {<svc_operation>} {($ Id.VSub_DollarName svc)} 
                                                  {<enable>}
                                                )
                                              ]
                                              negated: T
                                              stderr_indices: []
                                            )
                                          ]
                                        )
                                      action: [
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Return return>
                                          arg_word: {<1>}
                                        )
                                      ]
                                      spids: [5824 5835]
                                    )
                                  ]
                                  else_action: []
                                  redirects: []
                                )
                              ]
                            )
                          redirects: []
                        )
                      ]
                      spids: [5799 5807]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
              ]
              redirects: []
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: disable_services
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<svc>})
            (C {<check_device_groups>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                          {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [5893 5907]
                )
              ]
              else_action: []
              redirects: []
            )
            (C {<no_depend_check>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.DParen
                          child: 
                            (arith_expr.Binary
                              op_id: Id.Arith_DEqual
                              left: ($ Id.Lit_ArithVarLike r_flag)
                              right: {<Id.Lit_Digits 0>}
                            )
                          redirects: []
                        )
                      ]
                    )
                  action: [
                    (command.ForEach
                      iter_names: [svc]
                      iterable: (for_iter.Words words:[{($ Id.VSub_DollarName SMF_DISABLE)}])
                      body: 
                        (command.DoGroup
                          children: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (command.Pipeline
                                          children: [
                                            (C {<svc_operation>} {($ Id.VSub_DollarName svc)} 
                                              {<disable>}
                                            )
                                          ]
                                          negated: T
                                          stderr_indices: []
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<rm_no_depend_check>})
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [5981 5992]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                        )
                      redirects: []
                    )
                    (command.Pipeline
                      children: [
                        (C {<modinfo>})
                        (C {<grep>} {(SQ <'(nws:'>)})
                        (C {<grep>} {<-v>} {(DQ <'kRPC Stub'>)})
                        (C {<sort>} {<-r>})
                        (C {<cut>} {<-d> (SQ <' '>)} {<-f1>})
                        (command.Simple
                          words: [{<xargs>} {<-l>} {<modunload>} {<-i>}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          more_env: []
                          do_fork: T
                        )
                      ]
                      negated: F
                      stderr_indices: []
                    )
                    (command.Pipeline
                      children: [
                        (C {<modinfo>})
                        (C {<grep>} {(SQ <'(nws:'>)})
                        (C {<grep>} {<-v>} {(DQ <'kRPC Stub'>)})
                        (C {<sort>} {<-r>})
                        (C {<cut>} {<-d> (SQ <' '>)} {<-f1>})
                        (command.Simple
                          words: [{<xargs>} {<-l>} {<modunload>} {<-i>}]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          more_env: []
                          do_fork: T
                        )
                      ]
                      negated: F
                      stderr_indices: []
                    )
                  ]
                  spids: [5952 5966]
                )
              ]
              else_action: [
                (C {<check_enabled>})
                (command.ForEach
                  iter_names: [svc]
                  iterable: (for_iter.Words words:[{<nws_rdcsyncd>} {<nws_rdc>}])
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Pipeline
                                      children: [
                                        (C {<svc_operation>} {($ Id.VSub_DollarName svc)} {<disable>})
                                      ]
                                      negated: T
                                      stderr_indices: []
                                    )
                                  ]
                                )
                              action: [
                                (C {<rm_no_depend_check>})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [6159 6170]
                            )
                          ]
                          else_action: []
                          redirects: []
                        )
                      ]
                    )
                  redirects: []
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.DParen
                              child: 
                                (arith_expr.Binary
                                  op_id: Id.Arith_DEqual
                                  left: ($ Id.Lit_ArithVarLike nws_ii_enabled)
                                  right: {<Id.Lit_Digits 0>}
                                )
                              redirects: []
                            )
                          ]
                        )
                      action: [
                        (command.ForEach
                          iter_names: [svc]
                          iterable: (for_iter.Words words:[{<nws_sv>} {<nws_scm>}])
                          body: 
                            (command.DoGroup
                              children: [
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.AndOr
                                              ops: [Id.Op_DAmp]
                                              children: [
                                                (command.DParen
                                                  child: 
                                                    {(${ Id.VSub_Name svc) 
                                                      <Id.Lit_ArithVarLike _enabled>
                                                    }
                                                  redirects: []
                                                )
                                                (command.Pipeline
                                                  children: [
                                                    (C {<svc_operation>} {($ Id.VSub_DollarName svc)} 
                                                      {<disable>}
                                                    )
                                                  ]
                                                  negated: T
                                                  stderr_indices: []
                                                )
                                              ]
                                            )
                                          ]
                                        )
                                      action: [
                                        (C {<rm_no_depend_check>})
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Return return>
                                          arg_word: {<1>}
                                        )
                                      ]
                                      spids: [6219 6242]
                                    )
                                  ]
                                  else_action: []
                                  redirects: []
                                )
                              ]
                            )
                          redirects: []
                        )
                      ]
                      spids: [6188 6202]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
              ]
              redirects: []
            )
            (C {<rm_no_depend_check>})
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: is_imported
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<Id.Lit_VarLike 'svc='> ($ Id.VSub_Number 1)})
            (C {<svcprop>} {<-q>} {<-p>} {<'general/entity_stability'>} 
              {<svc> <Id.Lit_Colon ':'> <'/system/'> (${ Id.VSub_Name svc)}
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} {<1>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [6327 6340]
                )
              ]
              else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: import_services
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<svc>})
            (command.ForEach
              iter_names: [svc]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName SMF_ENABLE)}])
              body: (command.DoGroup children:[(C {<import_service>} {($ Id.VSub_DollarName svc)})])
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name: import_service
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {($ Id.VSub_DollarName xopt)})
            (C {<typeset>} {<Id.Lit_VarLike 'svc='> ($ Id.VSub_Number 1)})
            (C {<is_imported>} {($ Id.VSub_DollarName svc)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} {<0>} 
                          {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {<-f>} 
                                  {($ Id.VSub_DollarName PKG_INSTALL_ROOT) <'/'> 
                                    ($ Id.VSub_DollarName MANIFEST_PATH) <'/'> ($ Id.VSub_DollarName svc) <.xml>
                                  } {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (C {<svccfg>} {<Id.KW_Import import>} 
                              {($ Id.VSub_DollarName PKG_INSTALL_ROOT) <'/'> 
                                ($ Id.VSub_DollarName MANIFEST_PATH) <'/'> ($ Id.VSub_DollarName svc) <.xml>
                              }
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName OS_MINOR)} 
                                          {<-lt>} {<11>} {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (C {<svcadm>} {<refresh>} 
                                      {(${ Id.VSub_Name FS_LOCAL_SVC) <Id.Lit_Colon ':'> <default>}
                                    )
                                  ]
                                  spids: [6493 6506]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                          spids: [6461 6477]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                  spids: [6445 6458]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'enable='> name:enable)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [6547]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'disable='> name:disable)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [6550]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'set_location='> name:set_location)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [6553]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'get_info='> name:get_info)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [6556]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'r_flag='> name:r_flag)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [6559]
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p_flag='> name:p_flag)
          op: assign_op.Equal
          rhs: {<0>}
          spids: [6562]
        )
      ]
      redirects: []
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Simple
              words: [{<getopts>} {(DQ <xedsirp>)} {<opt>}]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              more_env: []
              do_fork: T
            )
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {($ Id.VSub_DollarName opt)}
              arms: [
                (case_arm
                  pat_list: [{(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\?'> ch:'?')}]
                  action: [(C {<help>})]
                  spids: [6588 6589 6595 -1]
                )
                (case_arm
                  pat_list: [{<e>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'enable='> name:enable)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [6602]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [6598 6599 6606 -1]
                )
                (case_arm
                  pat_list: [{<d>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'disable='> name:disable)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [6613]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [6609 6610 6617 -1]
                )
                (case_arm
                  pat_list: [{<x>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'xopt='> name:xopt)
                          op: assign_op.Equal
                          rhs: {(DQ <'set -x'>)}
                          spids: [6624]
                        )
                      ]
                      redirects: []
                    )
                    (C {<set>} {<-x>})
                  ]
                  spids: [6620 6621 6635 -1]
                )
                (case_arm
                  pat_list: [{<s>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'set_location='>
                              name: set_location
                            )
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [6642]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [6638 6639 6646 -1]
                )
                (case_arm
                  pat_list: [{<i>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'get_info='> name:get_info)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [6653]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [6649 6650 6657 -1]
                )
                (case_arm
                  pat_list: [{<r>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'r_flag='> name:r_flag)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [6664]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [6660 6661 6668 -1]
                )
                (case_arm
                  pat_list: [{<p>}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'p_flag='> name:p_flag)
                          op: assign_op.Equal
                          rhs: {<1>}
                          spids: [6675]
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [6671 6672 6679 -1]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'options_count='> name:options_count)
          op: assign_op.Equal
          rhs: 
            {
              (word_part.ArithSub
                anode: 
                  (arith_expr.Binary
                    op_id: Id.Arith_Plus
                    left: 
                      (arith_expr.Binary
                        op_id: Id.Arith_Plus
                        left: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: ($ Id.Lit_ArithVarLike enable)
                            right: ($ Id.Lit_ArithVarLike disable)
                          )
                        right: ($ Id.Lit_ArithVarLike set_location)
                      )
                    right: ($ Id.Lit_ArithVarLike get_info)
                  )
              )
            }
          spids: [6690]
        )
      ]
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName options_count)} {<-gt>} {<1>} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [(C {<help>})]
          spids: [6708 6720]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName options_count)} {<Id.Lit_Equals '='>} 
                  {<0>} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NO_ARGS='> name:NO_ARGS)
                  op: assign_op.Equal
                  rhs: {<1>}
                  spids: [6740]
                )
              ]
              redirects: []
            )
          ]
          spids: [6725 6737]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Id.Arith_DAmp
                      left: 
                        (arith_expr.Binary
                          op_id: Id.Arith_Great
                          left: 
                            (arith_expr.Binary
                              op_id: Id.Arith_Plus
                              left: ($ Id.Lit_ArithVarLike r_flag)
                              right: ($ Id.Lit_ArithVarLike p_flag)
                            )
                          right: {<Id.Lit_Digits 0>}
                        )
                      right: 
                        (arith_expr.Binary
                          op_id: Id.Arith_DEqual
                          left: 
                            (arith_expr.Binary
                              op_id: Id.Arith_Pipe
                              left: ($ Id.Lit_ArithVarLike enable)
                              right: ($ Id.Lit_ArithVarLike disable)
                            )
                          right: {<Id.Lit_Digits 0>}
                        )
                    )
                  redirects: []
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'-r and -p options may only be used with -d or -e options'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
          spids: [6746 6783]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.DParen
                  child: 
                    (arith_expr.Binary
                      op_id: Id.Arith_DAmp
                      left: ($ Id.Lit_ArithVarLike p_flag)
                      right: ($ Id.Lit_ArithVarLike disable)
                    )
                  redirects: []
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'The -p option may not be used with the -d option'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
          spids: [6800 6813]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<get_system_state>})
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName enable)} {<Id.Lit_Equals '='>} {<1>} 
                  {<-a>} {($ Id.VSub_DollarName VALID_LOCAL_DB)} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<1>} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'Cannot find a valid configuration database'>)}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
          spids: [6844 6865]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName NO_ARGS)} {<Id.Lit_Equals '='>} {<1>} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName VALID_LOCAL_DB)} 
                              {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<echo>} {(DQ <'Local configuration database is already initialized.'>)})]
                  spids: [6905 6918]
                )
              ]
              else_action: [
                (C {<initialize_local_db>})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<1>}
                        )
                      ]
                      spids: [6934 6948]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
              ]
              redirects: []
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName CLUSTER_CONFIGURED)} 
                          {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {($ Id.VSub_DollarName VALID_CLUSTER_DB)} {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<printf>} {(DQ <'Cluster configuration database is already '>)})
                            (C {<printf>} {(DQ <initialized.> <Id.Lit_BadBackslash '\\'> <n>)})
                          ]
                          spids: [6979 6992]
                        )
                      ]
                      else_action: [
                        (C {<set_cluster_config>})
                        (C {<initialize_cluster_db>})
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [7030 7044]
                            )
                          ]
                          else_action: []
                          redirects: []
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [6963 6976]
                )
              ]
              else_action: []
              redirects: []
            )
            (command.ForEach
              iter_names: [svc]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName SMF_ENABLE)}])
              body: 
                (command.DoGroup
                  children: [
                    (C {<check_fs_local_grouping>} {($ Id.VSub_DollarName svc)})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              ]
                            )
                          action: [
                            (C {<printf>} 
                              {
                                (DQ <'Warning: Fixing dependency for '> ($ Id.VSub_DollarName svc) <.> 
                                  <Id.Lit_BadBackslash '\\'> <n>
                                )
                              }
                            )
                            (C {<set_fs_local_grouping>} {($ Id.VSub_DollarName svc)} 
                              {($ Id.VSub_DollarName CORRECT_GROUPING)}
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: 
                                    (condition.Shell
                                      commands: [
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-ne>} {<0>} 
                                          {<Id.Lit_RBracket ']'>}
                                        )
                                      ]
                                    )
                                  action: [
                                    (command.ControlFlow
                                      token: <Id.ControlFlow_Return return>
                                      arg_word: {<1>}
                                    )
                                  ]
                                  spids: [7131 7144]
                                )
                              ]
                              else_action: []
                              redirects: []
                            )
                          ]
                          spids: [7085 7098]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                )
              redirects: []
            )
            (C {<check_enabled>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} 
                              {<1>} {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} 
                                      {($ Id.VSub_DollarName OLD_VALID_LOCAL_DB)} {<Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<printf>} {(DQ <'WARNING: AVS services are running on a system '>)})
                            (C {<printf>} 
                              {
                                (DQ <'which had no valid configuration'> <Id.Lit_BadBackslash '\\'> 
                                  <ndatabase> <Id.Lit_BadBackslash '\\'> <n>
                                )
                              }
                            )
                          ]
                          spids: [7185 7198]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                    (C {<show_enabled>})
                  ]
                  spids: [7169 7182]
                )
              ]
              else_action: [
                (C {<ask_to_enable>})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<Id.Lit_Equals '='>} 
                                  {<1>} {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (C {<enable_services>})
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              action: [
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [7250 7264]
                            )
                          ]
                          else_action: []
                          redirects: []
                        )
                      ]
                      spids: [7231 7244]
                    )
                  ]
                  else_action: []
                  redirects: []
                )
              ]
              redirects: []
            )
          ]
          spids: [6885 6897]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName enable)} {<Id.Lit_Equals '='>} {<1>} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (C {<enable_services>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [7299 7313]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          spids: [7281 7293]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName disable)} {<Id.Lit_Equals '='>} {<1>} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (C {<disable_services>})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                          {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})]
                  spids: [7342 7356]
                )
              ]
              else_action: []
              redirects: []
            )
          ]
          spids: [7324 7336]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName get_info)} {<Id.Lit_Equals '='>} {<1>} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [(C {<display_info>})]
          spids: [7367 7379]
        )
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName set_location)} {<Id.Lit_Equals '='>} 
                  {<1>} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName CLUSTER_CONFIGURED)} 
                          {<Id.Lit_Equals '='>} {<1>} {<Id.Lit_RBracket ']'>}
                        )
                      ]
                    )
                  action: [
                    (C {<set_cluster_config>})
                    (C {<initialize_cluster_db>})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} 
                                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (command.ControlFlow
                              token: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          spids: [7431 7445]
                        )
                      ]
                      else_action: []
                      redirects: []
                    )
                  ]
                  spids: [7400 7413]
                )
              ]
              else_action: [
                (command.Simple
                  words: [
                    {<echo>}
                    {
                      (DQ ($ Id.VSub_DollarName PROG) 
                        <' -s is only available on Sun Cluster OE systems'>
                      )
                    }
                  ]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  more_env: []
                  do_fork: T
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
              redirects: []
            )
          ]
          spids: [7385 7397]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})
  ]
)