(command.CommandList children: [ (command.ShAssignment left: <Id.Lit_VarLike 'PIDDIR='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'PIDDIR='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PIDDIR='> name:PIDDIR) op: assign_op.Equal rhs: {<'/var/run/samba'>} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'NMBDPID='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'NMBDPID='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NMBDPID='> name:NMBDPID) op: assign_op.Equal rhs: {($ Id.VSub_DollarName PIDDIR) <'/nmbd.pid'>} ) ] redirects: [] ) (command.Simple blame_tok: <unset> more_env: [] words: [{<unset>} {<TMPDIR>}] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-x>} {<'/usr/sbin/nmbd'>}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {<'/lib/lsb/init-functions'>}] redirects: [] do_fork: T ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{($ Id.VSub_Number 1)}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <start> pattern: (pat.Words words:[{<start>}]) middle: <Id.Right_CasePat _> action: [ (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: <init_is_upstart> more_env: [] words: [{<init_is_upstart>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})] spids: [81 86] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'SERVER_ROLE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'SERVER_ROLE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SERVER_ROLE='> name:SERVER_ROLE) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <samba-tool> more_env: [] words: [ {<samba-tool>} {<testparm>} {<--parameter-name> <Id.Lit_Equals '='> (DQ <'server role'>)} ] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple blame_tok: <tail> more_env: [] words: [{<tail>} {<-1>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] 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 '['>} {(DQ ($ Id.VSub_DollarName SERVER_ROLE))} {<Id.Lit_Equals '='>} {(DQ <'active directory domain controller'>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})] spids: [122 139] ) ] 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.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-n>} { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <which> more_env: [] words: [{<which>} {<testparm>}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'NMBD_DISABLED='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'NMBD_DISABLED='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'NMBD_DISABLED='> name: NMBD_DISABLED ) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <testparm> more_env: [] words: [ {<testparm>} {<-s>} {<--parameter-name> <Id.Lit_Equals '='> (SQ <'disable netbios'>)} ] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) ] spids: [151 168] ) ] 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 '['>} {(DQ ($ Id.VSub_DollarName NMBD_DISABLED))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<Yes>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Starting NetBIOS name server'>)} {<nmbd>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <install> more_env: [] words: [ {<install>} {<-o>} {<root>} {<-g>} {<root>} {<-m>} {<755>} {<-d>} {($ Id.VSub_DollarName PIDDIR)} ] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <start-stop-daemon> more_env: [] words: [ {<start-stop-daemon>} {<--start>} {<--quiet>} {<--oknodo>} {<--exec>} {<'/usr/sbin/nmbd'>} {<-->} {<-D>} ] redirects: [] do_fork: T ) ] ops: [] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<1>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [245 266] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<0>}] redirects: [] do_fork: T ) ] spids: [193 209] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <stop> pattern: (pat.Words words:[{<stop>}]) middle: <Id.Right_CasePat _> action: [ (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: <init_is_upstart> more_env: [] words: [{<init_is_upstart>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})] spids: [298 303] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Stopping NetBIOS name server'>)} {<nmbd>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <start-stop-daemon> more_env: [] words: [ {<start-stop-daemon>} {<--stop>} {<--quiet>} {<--pidfile>} {($ Id.VSub_DollarName NMBDPID)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <sleep> more_env: [] words: [{<sleep>} {<1>}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName NMBDPID)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <ps> more_env: [] words: [ {<ps>} {<h>} { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>} {($ Id.VSub_DollarName NMBDPID)}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ops: [] ) ] ops: [<Id.Op_DAmp _>] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <rm> more_env: [] words: [{<rm>} {<-f>} {($ Id.VSub_DollarName NMBDPID)}] redirects: [] do_fork: T ) ] spids: [345 376] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<0>}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <restart> pattern: (pat.Words words:[{<restart>} {<force-reload>}]) middle: <Id.Right_CasePat _> action: [ (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: <init_is_upstart> more_env: [] words: [{<init_is_upstart>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})] spids: [413 418] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <Id.VSub_Number '$0'> more_env: [] words: [{($ Id.VSub_Number 0)} {<stop>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sleep> more_env: [] words: [{<sleep>} {<1>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <Id.VSub_Number '$0'> more_env: [] words: [{($ Id.VSub_Number 0)} {<start>}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <status> pattern: (pat.Words words:[{<status>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <status_of_proc> more_env: [] words: [ {<status_of_proc>} {<-p>} {($ Id.VSub_DollarName NMBDPID)} {<'/usr/sbin/nmbd'>} {<nmbd>} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_QMark '?')} ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_Star '*'> pattern: (pat.Words words:[{<Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Usage: /etc/init.d/nmbd {start|stop|restart|force-reload|status}'>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )