(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PIDDIR spids:[36]) op: Equal rhs: {(/var/run/samba)} spids: [36] ) ] spids: [36] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SMBDPID spids:[39]) op: Equal rhs: {($ VSub_DollarName '$PIDDIR') (/smbd.pid)} spids: [39] ) ] spids: [39] ) (C {(unset)} {(TMPDIR)}) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-x)} {(/usr/sbin/smbd)}) (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 89] ) ] spids: [16777215 97] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SERVER_ROLE spids:[100]) 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: [101 120] ) } spids: [100] ) ] spids: [100] ) (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 140] ) ] spids: [16777215 148] ) (C {(log_daemon_msg)} {(DQ ('Starting SMB/CIFS daemon'))} {(smbd)}) (C {(install)} {(-o)} {(root)} {(-g)} {(root)} {(-m)} {(755)} {(-d)} {($ VSub_DollarName '$PIDDIR')} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(start-stop-daemon)} {(--start)} {(--quiet)} {(--oknodo)} {(--exec)} {(/usr/sbin/smbd)} {(--)} {(-D)} ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_end_msg)} {(1)}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 206] ) ] spids: [16777215 219] ) (C {(log_end_msg)} {(0)}) ] spids: [80 81 228 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 240] ) ] spids: [16777215 248] ) (C {(log_daemon_msg)} {(DQ ('Stopping SMB/CIFS daemon'))} {(smbd)}) (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--pidfile)} {($ VSub_DollarName '$SMBDPID')}) (C {(sleep)} {(1)}) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-f)} {($ VSub_DollarName '$SMBDPID')} {(Lit_Other ']')}) (command.Pipeline children: [ (command.SimpleCommand words: [ {(ps)} {(h)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(cat)} {($ VSub_DollarName '$SMBDPID')})] ) left_token: <Left_Backtick '`'> spids: [300 304] ) } ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) ] ) ] negated: T ) ] ) ] action: [(C {(rm)} {(-f)} {($ VSub_DollarName '$SMBDPID')})] spids: [16777215 311] ) ] spids: [16777215 329] ) (C {(log_end_msg)} {(0)}) ] spids: [231 232 339 16777215] ) (case_arm pat_list: [{(reload)}] action: [ (C {(log_daemon_msg)} {(DQ ('Reloading /etc/samba/smb.conf'))} {(smbd)}) (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--signal)} {(HUP)} {(--pidfile)} {($ VSub_DollarName '$SMBDPID')} ) (C {(log_end_msg)} {(0)}) ] spids: [342 343 377 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 391] ) ] spids: [16777215 399] ) (C {($ VSub_Number '$0')} {(stop)}) (C {(sleep)} {(1)}) (C {($ VSub_Number '$0')} {(start)}) ] spids: [380 383 417 16777215] ) (case_arm pat_list: [{(status)}] action: [ (C {(status_of_proc)} {(-p)} {($ VSub_DollarName '$SMBDPID')} {(/usr/sbin/smbd)} {(smbd)}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {($ VSub_QMark '$?')} ) ] spids: [420 421 440 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(echo)} {(DQ ('Usage: /etc/init.d/smbd {start|stop|reload|restart|force-reload|status}'))} ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [443 444 459 16777215] ) ] spids: [73 77 461] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )