(command.CommandList children: [ (C {<set>} {<-e>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH) op: assign_op.Equal rhs: {<'/usr/bin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> <'/sbin'> } spids: [36] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SOCKET_DIR='> name:SOCKET_DIR) op: assign_op.Equal rhs: {<.X11-unix>} spids: [45] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ICE_DIR='> name:ICE_DIR) op: assign_op.Equal rhs: {<.ICE-unix>} spids: [48] ) ] redirects: [] ) (C {<.>} {<'/lib/lsb/init-functions'>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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] ) ] else_action: [] redirects: [] ) (command.ShFunction name: do_restorecon body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [{<which>} {<restorecon>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] more_env: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<restorecon>} {(DQ ($ Id.VSub_Number 1))})] spids: [89 102] ) ] else_action: [] redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: set_up_dir body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DIR='> name:DIR) op: assign_op.Equal rhs: {(DQ <'/tmp/'> ($ Id.VSub_Number 1))} spids: [131] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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 stderr_indices: [] ) (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 '$('> child: (C {<mktemp>} {<-d>} {($ Id.VSub_DollarName DIR) <.XXXXXX>}) right: <Id.Eof_RParen _> ) ) } ) ] spids: [172 205] ) ] else_action: [] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'error='> name:error) op: assign_op.Equal rhs: {<0>} spids: [230] ) ] redirects: [] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_Colon ':'>}) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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: (condition.Shell commands: [ (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] ) ] else_action: [] redirects: [] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fn='> name:fn) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<'/tmp/testwriteable.XXXXXXXXXX'>}) right: <Id.Eof_RParen _> ) ) } spids: [303] ) ] redirects: [] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) (C {<rm>} {(DQ ($ Id.VSub_DollarName fn))}) ] spids: [242 256] ) ] else_action: [] redirects: [] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<mkdir>} {<-p>} {<-m>} {<01777>} {(DQ ($ Id.VSub_DollarName DIR))}) (BraceGroup left: <Id.Lit_LBrace '{'> 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 left: <Id.Lit_VarLike 'error='> name: error ) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: ($ Id.Lit_ArithVarLike error) right: {<Id.Lit_Digits 1>} ) ) } spids: [353] ) ] redirects: [] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Continue continue>) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ] ) (command.Case to_match: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [ {<stat>} {<-c>} {(SQ <'%u %g %a %F'>)} {(DQ ($ Id.VSub_DollarName DIR))} ] redirects: [] more_env: [(env_pair name:LC_ALL val:{<C>} spids:[376])] do_fork: T ) right: <Id.Eof_RParen _> ) ) } 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_Colon ':'> <root>} {(DQ ($ Id.VSub_DollarName DIR))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'error='> name: error ) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: ($ Id.Lit_ArithVarLike error) right: {<Id.Lit_Digits 1>} ) ) } spids: [466] ) ] redirects: [] ) ] ) (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] ) ] redirects: [] ) ] ) redirects: [] ) (C {<do_restorecon>} {(DQ ($ Id.VSub_DollarName DIR))}) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_status body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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>})] redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{<start>}] action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (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] ) ] else_action: [] redirects: [] ) (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: (condition.Shell commands: [ (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] ) ] else_action: [] redirects: [] ) ] 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_Colon ':'>})] 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] ) ] redirects: [] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )