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