(CommandList children: [ (C {(set)} {(-e)}) (Case to_match: {($ VSub_Number "$1")} arms: [ (case_arm pat_list: [{(start)}] action: (CommandList children: [ (C {(/etc/init.d/nmbd)} {(start)}) (C {(/etc/init.d/smbd)} {(start)}) (C {(/etc/init.d/samba-ad-dc)} {(start)}) ] ) spids: [47 48 66 -1] ) (case_arm pat_list: [{(stop)}] action: (CommandList children: [ (C {(/etc/init.d/samba-ad-dc)} {(stop)}) (C {(/etc/init.d/smbd)} {(stop)}) (C {(/etc/init.d/nmbd)} {(stop)}) ] ) spids: [69 70 88 -1] ) (case_arm pat_list: [{(reload)}] action: (C {(/etc/init.d/smbd)} {(reload)}) spids: [91 92 100 -1] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: (CommandList children: [ (C {(/etc/init.d/nmbd)} {(DQ ($ VSub_Number "$1"))}) (C {(/etc/init.d/smbd)} {(DQ ($ VSub_Number "$1"))}) (C {(/etc/init.d/samba-ad-dc)} {(DQ ($ VSub_Number "$1"))}) ] ) spids: [103 106 130 -1] ) (case_arm pat_list: [{(status)}] action: (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:status) rhs:{(0)} spids:[137])] spids: [137] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:NMBD_DISABLED) rhs: { (CommandSubPart command_list: (AndOr children: [ (SimpleCommand words: [ {(testparm)} {(-s)} {(--parameter-name) (Lit_Other "=") (SQ <"disable netbios">)} ] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: 2 spids: [153] ) ] ) (C {(true)}) ] op_id: Op_DPipe ) spids: [142 159] ) } spids: [141] ) ] spids: [141] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:SERVER_ROLE) rhs: { (CommandSubPart command_list: (AndOr children: [ (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: [174] ) ] ) (C {(tail)} {(-1)}) ] negated: False ) (C {(true)}) ] op_id: Op_DPipe ) spids: [163 186] ) } spids: [162] ) ] spids: [162] ) (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$SERVER_ROLE"))} {(KW_Bang "!") (Lit_Other "=")} {(DQ ("active directory domain controller"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$NMBD_DISABLED"))} {(KW_Bang "!") (Lit_Other "=")} {(DQ (Yes))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (AndOr children: [ (C {(/etc/init.d/nmbd)} {(status)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:status) rhs: {($ VSub_QMark "$?")} spids: [237] ) ] spids: [237] ) ] op_id: Op_DPipe ) spids: [-1 228] ) ] spids: [-1 241] ) (AndOr children: [ (C {(/etc/init.d/smbd)} {(status)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:status) rhs: {($ VSub_QMark "$?")} spids: [250] ) ] spids: [250] ) ] op_id: Op_DPipe ) ] ) spids: [-1 207] ) ] else_action: (AndOr children: [ (C {(/etc/init.d/samba-ad-dc)} {(status)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:status) rhs: {($ VSub_QMark "$?")} spids: [263] ) ] spids: [263] ) ] op_id: Op_DPipe ) spids: [254 267] ) (C {(exit)} {($ VSub_Name "$status")}) ] ) spids: [133 134 275 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: (CommandList children: [ (C {(echo)} {(DQ ("Usage: /etc/init.d/samba {start|stop|reload|restart|force-reload|status}"))} ) (C {(exit)} {(1)}) ] ) spids: [278 279 294 -1] ) ] spids: [40 44 296] ) ] )