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