(command.CommandList
  children: [
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName ROOT))} {<Id.Lit_RBracket ']'>})
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (C {<echo>} {(DQ <'Need a bldenv to set ROOT=...'>)})
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              terminator: <Id.Op_Semi _>
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalOr
                      left: 
                        (bool_expr.LogicalNot
                          child: (bool_expr.Unary op_id:Id.BoolUnary_w child:{<'/var/smb'>})
                        )
                      right: 
                        (bool_expr.LogicalNot
                          child: (bool_expr.Unary op_id:Id.BoolUnary_w child:{<'/var/run/smb'>})
                        )
                    )
                  redirects: []
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Need to create/chown/chmod /var/smb /var/run/smb'>)})
            (C {<echo>} {(DQ <'mkdir -p /var/run/smb'>)})
            (C {<echo>} {(DQ <'chown -R '> ($ Id.VSub_DollarName USER) <' /var/smb /var/run/smb'>)})
            (C {<echo>} {(DQ <'chmod -R a+rw  /var/smb /var/run/smb'>)})
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              terminator: <Id.Op_Semi _>
            )
          ]
          spids: [82 102]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalNot
                      child: (bool_expr.Unary op_id:Id.BoolUnary_r child:{<'/var/smb/smbpasswd'>})
                    )
                  redirects: []
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Need readable /var/smb/smbpasswd, i.e.'>)})
            (C {<echo>} {(SQ <'chgrp staff /var/smb/smbpasswd'>)})
            (C {<echo>} {(SQ <'chmod 440   /var/smb/smbpasswd'>)})
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              terminator: <Id.Op_Semi _>
            )
          ]
          spids: [143 155]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalAnd
                      left: (bool_expr.Unary op_id:Id.BoolUnary_e child:{<'/var/smb/.pwd.lock'>})
                      right: 
                        (bool_expr.LogicalNot
                          child: (bool_expr.Unary op_id:Id.BoolUnary_w child:{<'/var/smb/.pwd.lock'>})
                        )
                    )
                  redirects: []
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Need to cleanup /var/smb/.pwd.lock, i.e.'>)})
            (C {<echo>} {(DQ <'rm -f /var/smb/.pwd.lock'>)})
            (command.Sentence
              child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              terminator: <Id.Op_Semi _>
            )
          ]
          spids: [187 205]
        )
      ]
      else_action: []
      redirects: []
    )
    (C {<export>} {<Id.Lit_VarLike 'SMBD_DOOR_NAME='> (DQ <'/tmp/fksmbd_door'>)})
    (C {<export>} {<Id.Lit_VarLike 'SMB_SHARE_DNAME='> (DQ <'/tmp/fksmbshare_door'>)})
    (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: 
            {($ Id.VSub_DollarName ROOT) <'/usr/lib/smbsrv'> <Id.Lit_Colon ':'> 
              ($ Id.VSub_DollarName ROOT) <'/usr/lib'> <Id.Lit_Colon ':'> ($ Id.VSub_DollarName ROOT) <'/lib'>
            }
          spids: [249]
        )
      ]
      redirects: []
    )
    (C {<export>} {<LD_LIBRARY_PATH>})
    (C {<cd>} {<'/var/smb'>})
    (C {<exec>} {($ Id.VSub_DollarName ROOT) <'/usr/lib/smbsrv/fksmbd'>} {(DQ ($ Id.VSub_At '@'))})
  ]
)