(CommandList children: [ (C {(set)} {(-e)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PATH) op: Equal rhs: {(/usr/bin) (Lit_Other ":") (/usr/sbin) (Lit_Other ":") (/bin) (Lit_Other ":") (/sbin)} spids: [36] ) ] spids: [36] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SOCKET_DIR) op:Equal rhs:{(.X11-unix)} spids:[45])] spids: [45] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ICE_DIR) op:Equal rhs:{(.ICE-unix)} spids:[48])] spids: [48] ) (C {(.)} {(/lib/lsb/init-functions)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(/etc/default/rcS)} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [(C {(.)} {(/etc/default/rcS)})] spids: [-1 67] ) ] spids: [-1 74] ) (FuncDef name: do_restorecon body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (SimpleCommand words: [{(which)} {(restorecon)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [95] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [98] ) ] ) terminator: <Op_Semi ";"> ) ] action: [(C {(restorecon)} {(DQ ($ VSub_Number "$1"))})] spids: [-1 102] ) ] spids: [-1 112] ) ] spids: [82] ) spids: [77 81] ) (FuncDef name: set_up_dir body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:DIR) op: Equal rhs: {(DQ (/tmp/) ($ VSub_Number "$1"))} spids: [131] ) ] spids: [131] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(C {(log_progress_msg)} {(DQ ($ VSub_Name "$DIR"))})] spids: [-1 155] ) ] spids: [-1 165] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$DIR")} {(Lit_Other "]")}) (AndOr children: [ (Pipeline children: [ (C {(Lit_Other "[")} {(-d)} {($ VSub_Name "$DIR")} {(Lit_Other "]")}) ] negated: True ) (C {(Lit_Other "[")} {(-h)} {($ VSub_Name "$DIR")} {(Lit_Other "]")}) ] op_id: Op_DPipe ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (C {(mv)} {(DQ ($ VSub_Name "$DIR"))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(mktemp)} {(-d)} {($ VSub_Name "$DIR") (.XXXXXX)})] ) left_token: <Left_CommandSub "$("> spids: [215 222] ) ) } ) ] spids: [-1 205] ) ] spids: [-1 226] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:error) op:Equal rhs:{(0)} spids:[230])] spids: [230] ) (While cond: [(Sentence child:(C {(Lit_Other ":")}) terminator:<Op_Semi ";">)] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$error")} {(-ne)} {(0)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$error")} {(-gt)} {(5)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(log_failure_msg)} {(DQ ("failed to set up ") ($ VSub_Name "$DIR"))} ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [-1 284] ) ] spids: [-1 300] ) (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:fn) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(mktemp)} {(/tmp/testwriteable.XXXXXXXXXX)}) ] ) left_token: <Left_CommandSub "$("> spids: [305 309] ) ) } spids: [303] ) ] spids: [303] ) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DPipe ) (C {(rm)} {(DQ ($ VSub_Name "$fn"))}) ] spids: [-1 256] ) ] spids: [-1 326] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(-m)} {(01777)} {(DQ ($ VSub_Name "$DIR"))}) (BraceGroup children: [ (Sentence child: (AndOr children: [ (C {(rm)} {(DQ ($ VSub_Name "$DIR"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:error) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:error) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [354 361] ) } spids: [353] ) ] spids: [353] ) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) (Sentence child: (ControlFlow token:<ControlFlow_Continue continue>) terminator: <Op_Semi ";"> ) ] spids: [343] ) ] op_id: Op_DPipe ) (Case to_match: { (DQ (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [ {(stat)} {(-c)} {(SQ <"%u %g %a %F">)} {(DQ ($ VSub_Name "$DIR"))} ] more_env: [(env_pair name:LC_ALL val:{(C)} spids:[376])] ) ] ) left_token: <Left_CommandSub "$("> spids: [375 390] ) ) } arms: [ (case_arm pat_list: [{(DQ ("0 0 1777 directory"))}] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [397 399 409 -1] ) (case_arm pat_list: [{(DQ ("0 0 ")) (Lit_Other "*") (DQ (" directory"))}] action: [ (C {(chmod)} {(01777)} {(DQ ($ VSub_Name "$DIR"))}) (ControlFlow token:<ControlFlow_Break break>) ] spids: [413 419 438 -1] ) (case_arm pat_list: [{(Lit_Other "*") (DQ (" directory"))}] action: [ (AndOr children: [ (C {(chown)} {(-h)} {(root) (Lit_Other ":") (root)} {(DQ ($ VSub_Name "$DIR"))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:error) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:error) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [467 474] ) } spids: [466] ) ] spids: [466] ) ] op_id: Op_DPipe ) (ControlFlow token: <ControlFlow_Continue continue> ) ] spids: [441 445 480 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(log_failure_msg)} {(DQ ("failed to set up ") ($ VSub_Name "$DIR"))}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] spids: [483 484 500 -1] ) ] spids: [372 393 503] ) ] spids: [239 506] ) ) (C {(do_restorecon)} {(DQ ($ VSub_Name "$DIR"))}) (ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] spids: [128] ) spids: [123 127] ) (FuncDef name: do_status body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(-d)} {(DQ (/tmp/) ($ VSub_Name "$ICE_DIR"))} {(Lit_Other "]")} ) (C {(Lit_Other "[")} {(-d)} {(DQ (/tmp/) ($ VSub_Name "$SOCKET_DIR"))} {(Lit_Other "]")} ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(0)})] spids: [-1 559] ) ] else_action: [(ControlFlow token:<ControlFlow_Return return> arg_word:{(4)})] spids: [567 575] ) ] spids: [529] ) spids: [524 528] ) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list: [{(start)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(C {(log_begin_msg)} {(DQ ("Setting up X socket directories..."))})] spids: [-1 609] ) ] spids: [-1 619] ) (C {(set_up_dir)} {(DQ ($ VSub_Name "$SOCKET_DIR"))}) (C {(set_up_dir)} {(DQ ($ VSub_Name "$ICE_DIR"))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(C {(log_end_msg)} {(0)})] spids: [-1 652] ) ] spids: [-1 660] ) ] spids: [589 590 663 -1] ) (case_arm pat_list: [{(restart)} {(reload)} {(force-reload)}] action: [(C {(/etc/init.d/x11-common)} {(start)})] spids: [667 672 680 -1] ) (case_arm pat_list:[{(stop)}] action:[(C {(Lit_Other ":")})] spids:[684685691-1]) (case_arm pat_list:[{(status)}] action:[(C {(do_status)})] spids:[695696702-1]) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(log_success_msg)} { (DQ ("Usage: /etc/init.d/x11-common {start|stop|status|restart|reload|force-reload}")) } ) (C {(exit)} {(1)}) ] spids: [705 706 721 -1] ) ] spids: [580 586 723] ) (C {(exit)} {(0)}) ] )