(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:PIDDIR) rhs:{(/var/run/samba)} spids:[33])]
      spids: [33]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:NMBDPID)
          rhs: {($ VSub_Name "$PIDDIR") (/nmbd.pid)}
          spids: [36]
        )
      ]
      spids: [36]
    )
    (C {(unset)} {(TMPDIR)})
    (AndOr children:[(C {(test)} {(-x)} {(/usr/sbin/nmbd)})(C {(exit)} {(0)})] op_id:Op_DPipe)
    (C {(.)} {(/lib/lsb/init-functions)})
    (Case
      to_match: {($ VSub_Number "$1")}
      arms: [
        (case_arm
          pat_list: [{(start)}]
          action: 
            (CommandList
              children: [
                (If
                  arms: [
                    (if_arm
                      cond: (Sentence command:(C {(init_is_upstart)}) terminator:<Op_Semi ";">)
                      action: (C {(exit)} {(1)})
                      spids: [-1 86]
                    )
                  ]
                  spids: [-1 94]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LeftVar name:SERVER_ROLE)
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: 
                              (Pipeline
                                children: [
                                  (SimpleCommand
                                    words: [
                                      {(samba-tool)}
                                      {(testparm)}
                                      {(--parameter-name) (Lit_Other "=") (DQ ("server role"))}
                                    ]
                                    redirects: [
                                      (Redirect
                                        op_id: Redir_Great
                                        arg_word: {(/dev/null)}
                                        fd: 2
                                        spids: [109]
                                      )
                                    ]
                                  )
                                  (C {(tail)} {(-1)})
                                ]
                                negated: False
                              )
                            spids: [98 117]
                          )
                        }
                      spids: [97]
                    )
                  ]
                  spids: [97]
                )
                (If
                  arms: [
                    (if_arm
                      cond: 
                        (Sentence
                          command: 
                            (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$SERVER_ROLE"))} {(Lit_Other "=")} 
                              {(DQ ("active directory domain controller"))} {(Lit_Other "]")}
                            )
                          terminator: <Op_Semi ";">
                        )
                      action: (C {(exit)} {(0)})
                      spids: [-1 137]
                    )
                  ]
                  spids: [-1 145]
                )
                (If
                  arms: [
                    (if_arm
                      cond: 
                        (C {(Lit_Other "[")} {(-n)} 
                          {(CommandSubPart command_list:(C {(which)} {(testparm)}) spids:[155159])} {(Lit_Other "]")}
                        )
                      action: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LeftVar name:NMBD_DISABLED)
                              rhs: 
                                {
                                  (CommandSubPart
                                    command_list: 
                                      (SimpleCommand
                                        words: [
                                          {(testparm)}
                                          {(-s)}
                                          {(--parameter-name) (Lit_Other "=") (SQ <"disable netbios">)}
                                        ]
                                        redirects: [
                                          (Redirect
                                            op_id: Redir_Great
                                            arg_word: {(/dev/null)}
                                            fd: 2
                                            spids: [179]
                                          )
                                        ]
                                      )
                                    spids: [168 181]
                                  )
                                }
                              spids: [167]
                            )
                          ]
                          spids: [167]
                        )
                      spids: [-1 164]
                    )
                  ]
                  spids: [-1 184]
                )
                (If
                  arms: [
                    (if_arm
                      cond: 
                        (Sentence
                          command: 
                            (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$NMBD_DISABLED"))} 
                              {(KW_Bang "!") (Lit_Other "=")} {(Yes)} {(Lit_Other "]")}
                            )
                          terminator: <Op_Semi ";">
                        )
                      action: 
                        (CommandList
                          children: [
                            (C {(log_daemon_msg)} {(DQ ("Starting NetBIOS name server"))} {(nmbd)})
                            (C {(install)} {(-o)} {(root)} {(-g)} {(root)} {(-m)} {(755)} {(-d)} 
                              {($ VSub_Name "$PIDDIR")}
                            )
                            (If
                              arms: [
                                (if_arm
                                  cond: 
                                    (Pipeline
                                      children: [
                                        (C {(start-stop-daemon)} {(--start)} {(--quiet)} {(--oknodo)} 
                                          {(--exec)} {(/usr/sbin/nmbd)} {(--)} {(-D)}
                                        )
                                      ]
                                      negated: True
                                    )
                                  action: 
                                    (CommandList
                                      children: [(C {(log_end_msg)} {(1)}) (C {(exit)} {(1)})]
                                    )
                                  spids: [-1 260]
                                )
                              ]
                              spids: [-1 273]
                            )
                            (C {(log_end_msg)} {(0)})
                          ]
                        )
                      spids: [-1 203]
                    )
                  ]
                  spids: [-1 281]
                )
              ]
            )
          spids: [77 78 285 -1]
        )
        (case_arm
          pat_list: [{(stop)}]
          action: 
            (CommandList
              children: [
                (If
                  arms: [
                    (if_arm
                      cond: (Sentence command:(C {(init_is_upstart)}) terminator:<Op_Semi ";">)
                      action: (C {(exit)} {(0)})
                      spids: [-1 297]
                    )
                  ]
                  spids: [-1 305]
                )
                (C {(log_daemon_msg)} {(DQ ("Stopping NetBIOS name server"))} {(nmbd)})
                (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--pidfile)} {($ VSub_Name "$NMBDPID")})
                (C {(sleep)} {(1)})
                (If
                  arms: [
                    (if_arm
                      cond: 
                        (AndOr
                          children: [
                            (C {(Lit_Other "[")} {(-f)} {($ VSub_Name "$NMBDPID")} {(Lit_Other "]")})
                            (Pipeline
                              children: [
                                (SimpleCommand
                                  words: [
                                    {(ps)}
                                    {(h)}
                                    {
                                      (CommandSubPart
                                        command_list: (C {(cat)} {($ VSub_Name "$NMBDPID")})
                                        spids: [357 361]
                                      )
                                    }
                                  ]
                                  redirects: [
                                    (Redirect
                                      op_id: Redir_Great
                                      arg_word: {(/dev/null)}
                                      fd: -1
                                      spids: [363]
                                    )
                                  ]
                                )
                              ]
                              negated: True
                            )
                          ]
                          op_id: Op_DAmp
                        )
                      action: (C {(rm)} {(-f)} {($ VSub_Name "$NMBDPID")})
                      spids: [-1 368]
                    )
                  ]
                  spids: [-1 386]
                )
                (C {(log_end_msg)} {(0)})
              ]
            )
          spids: [288 289 396 -1]
        )
        (case_arm
          pat_list: [{(restart)} {(force-reload)}]
          action: 
            (CommandList
              children: [
                (If
                  arms: [
                    (if_arm
                      cond: (Sentence command:(C {(init_is_upstart)}) terminator:<Op_Semi ";">)
                      action: (C {(exit)} {(1)})
                      spids: [-1 410]
                    )
                  ]
                  spids: [-1 418]
                )
                (C {($ VSub_Number "$0")} {(stop)})
                (C {(sleep)} {(1)})
                (C {($ VSub_Number "$0")} {(start)})
              ]
            )
          spids: [399 402 436 -1]
        )
        (case_arm
          pat_list: [{(status)}]
          action: 
            (CommandList
              children: [
                (C {(status_of_proc)} {(-p)} {($ VSub_Name "$NMBDPID")} {(/usr/sbin/nmbd)} {(nmbd)})
                (C {(exit)} {($ VSub_QMark "$?")})
              ]
            )
          spids: [439 440 459 -1]
        )
        (case_arm
          pat_list: [{(Lit_Other "*")}]
          action: 
            (CommandList
              children: [
                (C {(echo)} {(DQ ("Usage: /etc/init.d/nmbd {start|stop|restart|force-reload|status}"))})
                (C {(exit)} {(1)})
              ]
            )
          spids: [462 463 478 -1]
        )
      ]
      spids: [70 74 480]
    )
    (C {(exit)} {(0)})
  ]
)