(command.CommandList
  children: [
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.AndOr
                                children: [
                                  (command.Simple
                                    blame_tok: <sysctl>
                                    more_env: []
                                    words: [{<sysctl>} {<-n>} {<kern.features.ufs_acl>}]
                                    redirects: [
                                      (Redir
                                        op: <Id.Redir_Great '2>'>
                                        loc: (redir_loc.Fd fd:2)
                                        arg: {<'/dev/null'>}
                                      )
                                    ]
                                    do_fork: T
                                  )
                                  (command.Simple
                                    blame_tok: <echo>
                                    more_env: []
                                    words: [{<echo>} {<0>}]
                                    redirects: []
                                    do_fork: T
                                  )
                                ]
                                ops: [<Id.Op_DPipe _>]
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                        {<-eq>}
                        {<0>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'1..0 # SKIP system does not have UFS ACL support'>)}]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
          spids: [113 141]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <id>
                                more_env: []
                                words: [{<id>} {<-u>}]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                        {<-ne>}
                        {<0>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'1..0 # SKIP you must be root'>)}]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
          spids: [157 174]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [{<echo>} {(DQ <1..4>)}]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'TESTDIR='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'TESTDIR='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TESTDIR='> name:TESTDIR)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    blame_tok: <dirname>
                    more_env: []
                    words: [
                      {<dirname>}
                      {
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <realpath>
                              more_env: []
                              words: [{<realpath>} {($ Id.VSub_Number 0)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      }
                    ]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Eof_RParen _>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'MD='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'MD='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MD='> name:MD)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Simple
                    blame_tok: <mdconfig>
                    more_env: []
                    words: [{<mdconfig>} {<-at>} {<swap>} {<-s>} {<10m>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'MNT='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'MNT='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MNT='> name:MNT)
          op: assign_op.Equal
          rhs: 
            {
              (CommandSub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Simple
                    blame_tok: <mktemp>
                    more_env: []
                    words: [{<mktemp>} {<-dt>} {<acltools>}]
                    redirects: []
                    do_fork: T
                  )
                right: <Id.Backtick_Right '`'>
              )
            }
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <newfs>
      more_env: []
      words: [{<newfs>} {<'/dev/'> ($ Id.VSub_DollarName MD)}]
      redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})]
      do_fork: T
    )
    (command.Simple
      blame_tok: <trap>
      more_env: []
      words: [
        {<trap>}
        {
          (DQ <'cd /; umount -f '> ($ Id.VSub_DollarName MNT) <'; rmdir '> ($ Id.VSub_DollarName MNT) 
            <'; mdconfig -d -u '> ($ Id.VSub_DollarName MD)
          )
        }
        {<EXIT>}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <mount>
      more_env: []
      words: [{<mount>} {<-o>} {<acls>} {<'/dev/'> ($ Id.VSub_DollarName MD)} {($ Id.VSub_DollarName MNT)}]
      redirects: []
      do_fork: T
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {($ Id.VSub_QMark '?')}
                        {<-ne>}
                        {<0>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'not ok 1 - mount failed.'>)}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(SQ <'Bail out!'>)}]
              redirects: []
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [272 285]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [{<echo>} {(DQ <'ok 1'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <cd>
      more_env: []
      words: [{<cd>} {($ Id.VSub_DollarName MNT)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <touch>
      more_env: []
      words: [{<touch>} {<xxx>}]
      redirects: []
      do_fork: T
    )
    (command.Sentence
      child: 
        (command.ShAssignment
          left: <Id.Lit_VarLike 'i='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'i='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i)
              op: assign_op.Equal
              rhs: {<0>}
            )
          ]
          redirects: []
        )
      terminator: <Id.Op_Semi _>
    )
    (command.WhileUntil
      keyword: <Id.KW_While while>
      cond: 
        (condition.Shell
          commands: [
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <Id.Lit_Colon ':'>
                  more_env: []
                  words: [{<Id.Lit_Colon ':'>}]
                  redirects: []
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      body: 
        (command.DoGroup
          left: <Id.KW_Do do>
          children: [
            (command.Sentence
              child: 
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'i='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'i='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'i='> name:i)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (word_part.ArithSub
                            left: <Id.Left_DollarDParen '$(('>
                            anode: 
                              (arith_expr.Binary
                                op_id: Id.Arith_Plus
                                left: {($ Id.VSub_DollarName i)}
                                right: {<Id.Lit_Digits 1>}
                              )
                            right: <Id.Right_DollarDParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (command.Simple
                  blame_tok: <setfacl>
                  more_env: []
                  words: [
                    {<setfacl>}
                    {<-m>}
                    {<u> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName i) <Id.Lit_Colon ':'> <rwx>}
                    {<xxx>}
                  ]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence
              child: 
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <Id.Lit_LBracket '['>
                                  more_env: []
                                  words: [
                                    {<Id.Lit_LBracket '['>}
                                    {($ Id.VSub_QMark '?')}
                                    {<-ne>}
                                    {<0>}
                                    {<Id.Lit_RBracket ']'>}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.Sentence
                          child: (command.ControlFlow keyword:<Id.ControlFlow_Break break>)
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      spids: [368 381]
                    )
                  ]
                  else_action: []
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          right: <Id.KW_Done done>
        )
      redirects: []
    )
    (command.Simple
      blame_tok: <chmod>
      more_env: []
      words: [{<chmod>} {<600>} {<xxx>}]
      redirects: []
      do_fork: T
    )
    (command.Simple blame_tok:<rm> more_env:[] words:[{<rm>} {<xxx>}] redirects:[] do_fork:T)
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [{<echo>} {(DQ <'ok 2'>)}]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <perl>
      more_env: []
      words: [
        {<perl>}
        {($ Id.VSub_DollarName TESTDIR) <'/run'>}
        {($ Id.VSub_DollarName TESTDIR) <'/tools-posix.test'>}
      ]
      redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      do_fork: T
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Simple
                      blame_tok: <Id.Lit_LBracket '['>
                      more_env: []
                      words: [
                        {<Id.Lit_LBracket '['>}
                        {($ Id.VSub_QMark '?')}
                        {<-eq>}
                        {<0>}
                        {<Id.Lit_RBracket ']'>}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'ok 3'>)}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [420 433]
        )
      ]
      else_kw: <Id.KW_Else else>
      else_action: [
        (command.Simple
          blame_tok: <echo>
          more_env: []
          words: [{<echo>} {(DQ <'not ok 3'>)}]
          redirects: []
          do_fork: T
        )
      ]
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.Simple blame_tok:<cd> more_env:[] words:[{<cd>} {<'/'>}] redirects:[] do_fork:T)
    (command.Simple
      blame_tok: <echo>
      more_env: []
      words: [{<echo>} {(DQ <'ok 4'>)}]
      redirects: []
      do_fork: T
    )
  ]
)