(command.CommandList children: [ (C {<Id.KW_Set set>} {<-e>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH) op: assign_op.Equal rhs: {</usr/bin> <Id.Lit_Other ':'> </usr/sbin> <Id.Lit_Other ':'> </bin> <Id.Lit_Other ':'> </sbin> } spids: [36] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SOCKET_DIR) op: assign_op.Equal rhs: {<.X11-unix>} spids: [45] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ICE_DIR) op: assign_op.Equal rhs: {<.ICE-unix>} spids: [48] ) ] ) (C {<.>} {</lib/lsb/init-functions>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {</etc/default/rcS>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [(C {<.>} {</etc/default/rcS>})] spids: [56 67] ) ] ) (command.ShFunction name: do_restorecon body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple words: [{<which>} {<restorecon>}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {</dev/null>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<1>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [(C {<restorecon>} {(DQ ($ Id.VSub_Number '$1'))})] spids: [89 102] ) ] ) ] ) ) (command.ShFunction name: set_up_dir body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DIR) op: assign_op.Equal rhs: {(DQ </tmp/> ($ Id.VSub_Number '$1'))} spids: [131] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(C {<log_progress_msg>} {(DQ ($ Id.VSub_DollarName '$DIR'))})] spids: [139 155] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-e>} {($ Id.VSub_DollarName '$DIR')} {<Id.Lit_RBracket ']'>} ) (command.Pipeline children: [ (C {<Id.Lit_LBracket '['>} {<-d>} {($ Id.VSub_DollarName '$DIR')} {<Id.Lit_RBracket ']'>} ) ] negated: T ) (C {<Id.Lit_LBracket '['>} {<-h>} {($ Id.VSub_DollarName '$DIR')} {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mv>} {(DQ ($ Id.VSub_DollarName '$DIR'))} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<mktemp>} {<-d>} {($ Id.VSub_DollarName '$DIR') <.XXXXXX>}) ] ) ) ) } ) ] spids: [172 205] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:error) op: assign_op.Equal rhs: {<0>} spids: [230] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(command.Sentence child:(C {<Id.Lit_Other ':'>}) terminator:<Id.Op_Semi _>)] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$error')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$error')} {<-gt>} {<5>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<log_failure_msg>} {(DQ <'failed to set up '> ($ Id.VSub_DollarName '$DIR'))} ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [271 284] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fn) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<mktemp>} {</tmp/testwriteable.XXXXXXXXXX>}) ] ) ) ) } spids: [303] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) (C {<rm>} {(DQ ($ Id.VSub_DollarName '$fn'))}) ] spids: [242 256] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<mkdir>} {<-p>} {<-m>} {<01777>} {(DQ ($ Id.VSub_DollarName '$DIR'))}) (command.BraceGroup children: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<rm>} {(DQ ($ Id.VSub_DollarName '$DIR'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:error) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.VarRef token: <Id.Lit_ArithVarLike error> ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) } spids: [353] ) ] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Continue continue>) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.Case to_match: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<stat>} {<-c>} {(SQ <'%u %g %a %F'>)} {(DQ ($ Id.VSub_DollarName '$DIR'))} ] more_env: [(env_pair name:LC_ALL val:{<C>} spids:[376])] ) ] ) ) ) } arms: [ (case_arm pat_list: [{(DQ <'0 0 1777 directory'>)}] action: [(command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [396 399 409 -1] ) (case_arm pat_list: [{(DQ <'0 0 '>) <Id.Lit_Star '*'> (DQ <' directory'>)}] action: [ (C {<chmod>} {<01777>} {(DQ ($ Id.VSub_DollarName '$DIR'))}) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [412 419 438 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'> (DQ <' directory'>)}] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<chown>} {<-h>} {<root> <Id.Lit_Other ':'> <root>} {(DQ ($ Id.VSub_DollarName '$DIR'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:error) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.VarRef token: <Id.Lit_ArithVarLike error> ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) } spids: [466] ) ] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] spids: [441 445 480 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<log_failure_msg>} {(DQ <'failed to set up '> ($ Id.VSub_DollarName '$DIR'))} ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [483 484 500 -1] ) ] ) ] ) ) (C {<do_restorecon>} {(DQ ($ Id.VSub_DollarName '$DIR'))}) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] ) ) (command.ShFunction name: do_status body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ </tmp/> ($ Id.VSub_DollarName '$ICE_DIR'))} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ </tmp/> ($ Id.VSub_DollarName '$SOCKET_DIR'))} {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})] spids: [532 559] ) ] else_action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<4>})] ) ] ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{<start>}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(C {<log_begin_msg>} {(DQ <'Setting up X socket directories...'>)})] spids: [593 609] ) ] ) (C {<set_up_dir>} {(DQ ($ Id.VSub_DollarName '$SOCKET_DIR'))}) (C {<set_up_dir>} {(DQ ($ Id.VSub_DollarName '$ICE_DIR'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(C {<log_end_msg>} {<0>})] spids: [636 652] ) ] ) ] 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 {<Id.Lit_Other ':'>})] spids: [684 685 691 -1] ) (case_arm pat_list:[{<status>}] action:[(C {<do_status>})] spids:[695 696 702 -1]) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<log_success_msg>} {(DQ <'Usage: /etc/init.d/x11-common {start|stop|status|restart|reload|force-reload}'>)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [705 706 721 -1] ) ] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )