(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH) op: assign_op.Equal rhs: {<'/sbin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> <'/usr/bin'> } spids: [53] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DESC='> name:DESC) op: assign_op.Equal rhs: {(DQ <'enhanced syslogd'>)} spids: [62] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NAME='> name:NAME) op: assign_op.Equal rhs: {<rsyslog>} spids: [67] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RSYSLOGD='> name:RSYSLOGD) op: assign_op.Equal rhs: {<rsyslogd>} spids: [71] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DAEMON='> name:DAEMON) op: assign_op.Equal rhs: {<'/usr/sbin/rsyslogd'>} spids: [74] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PIDFILE='> name:PIDFILE) op: assign_op.Equal rhs: {<'/var/run/rsyslogd.pid'>} spids: [77] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SCRIPTNAME='> name:SCRIPTNAME) op: assign_op.Equal rhs: {<'/etc/init.d/'> ($ Id.VSub_DollarName NAME)} spids: [81] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} {(DQ ($ Id.VSub_DollarName DAEMON))} {<Id.Lit_RBracket ']'>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-r>} {<'/etc/default/'> ($ Id.VSub_DollarName NAME)} {<Id.Lit_RBracket ']'>} ) (C {<.>} {<'/etc/default/'> ($ Id.VSub_DollarName NAME)}) ] ) (C {<.>} {<'/lib/lsb/init-functions'>}) (command.ShFunction name: do_start body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (C {<start-stop-daemon>} {<--start>} {<--quiet>} {<--pidfile>} {($ Id.VSub_DollarName PIDFILE)} {<--exec>} {($ Id.VSub_DollarName DAEMON)} {<-->} {($ Id.VSub_DollarName RSYSLOGD_OPTIONS)} ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_stop body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (C {<start-stop-daemon>} {<--stop>} {<--quiet>} {<--retry> <Id.Lit_Equals '='> <'TERM/30/KILL/5'>} {<--pidfile>} {($ Id.VSub_DollarName PIDFILE)} {<--exec>} {($ Id.VSub_DollarName DAEMON)} ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_rotate body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (C {<start-stop-daemon>} {<--stop>} {<--signal>} {<HUP>} {<--quiet>} {<--pidfile>} {($ Id.VSub_DollarName PIDFILE)} {<--exec>} {($ Id.VSub_DollarName DAEMON)} ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: create_xconsole body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'XCONSOLE='> name:XCONSOLE) op: assign_op.Equal rhs: {<'/dev/xconsole'>} spids: [266] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>} {<-s>}) right: <Id.Eof_RParen _> ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'XCONSOLE='> name:XCONSOLE) op: assign_op.Equal rhs: {<'/run/xconsole'>} spids: [295] ) ] redirects: [] ) (C {<ln>} {<-sf>} {($ Id.VSub_DollarName XCONSOLE)} {<'/dev/xconsole'>}) ] spids: [270 292] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} {($ Id.VSub_DollarName XCONSOLE)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<mknod>} {<-m>} {<640>} {($ Id.VSub_DollarName XCONSOLE)} {<p>}) (C {<chown>} {<root> <Id.Lit_Colon ':'> <adm>} {($ Id.VSub_DollarName XCONSOLE)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-x>} {<'/sbin/restorecon'>} {<Id.Lit_RBracket ']'>}) (C {<'/sbin/restorecon'>} {($ Id.VSub_DollarName XCONSOLE)}) ] ) ] spids: [311 324] ) ] else_action: [] redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: sendsigs_omit body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OMITDIR='> name:OMITDIR) op: assign_op.Equal rhs: {<'/run/sendsigs.omit.d'>} spids: [374] ) ] redirects: [] ) (C {<mkdir>} {<-p>} {($ Id.VSub_DollarName OMITDIR)}) (C {<ln>} {<-sf>} {($ Id.VSub_DollarName PIDFILE)} {($ Id.VSub_DollarName OMITDIR) <'/rsyslog'>} ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{<start>}] action: [ (C {<log_daemon_msg>} {(DQ <'Starting '> ($ Id.VSub_DollarName DESC))} {(DQ ($ Id.VSub_DollarName RSYSLOGD))} ) (C {<create_xconsole>}) (C {<do_start>}) (command.Case to_match: {(DQ ($ Id.VSub_QMark '?'))} arms: [ (case_arm pat_list: [{<0>}] action: [(C {<sendsigs_omit>}) (C {<log_end_msg>} {<0>})] spids: [437 438 447 -1] ) (case_arm pat_list: [{<1>}] action: [(C {<log_progress_msg>} {(DQ <'already started'>)}) (C {<log_end_msg>} {<0>})] spids: [450 451 464 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<log_end_msg>} {<1>})] spids: [467 468 474 -1] ) ] redirects: [] ) ] spids: [406 407 481 -1] ) (case_arm pat_list: [{<stop>}] action: [ (C {<log_daemon_msg>} {(DQ <'Stopping '> ($ Id.VSub_DollarName DESC))} {(DQ ($ Id.VSub_DollarName RSYSLOGD))} ) (C {<do_stop>}) (command.Case to_match: {(DQ ($ Id.VSub_QMark '?'))} arms: [ (case_arm pat_list: [{<0>}] action: [(C {<log_end_msg>} {<0>})] spids: [512 513 519 -1] ) (case_arm pat_list: [{<1>}] action: [(C {<log_progress_msg>} {(DQ <'already stopped'>)}) (C {<log_end_msg>} {<0>})] spids: [522 523 536 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<log_end_msg>} {<1>})] spids: [539 540 546 -1] ) ] redirects: [] ) ] spids: [484 485 553 -1] ) (case_arm pat_list: [{<rotate>}] action: [ (C {<log_daemon_msg>} {(DQ <'Closing open files'>)} {(DQ ($ Id.VSub_DollarName RSYSLOGD))}) (C {<do_rotate>}) (C {<log_end_msg>} {($ Id.VSub_QMark '?')}) ] spids: [556 557 579 -1] ) (case_arm pat_list: [{<restart>} {<force-reload>}] action: [(C {($ Id.VSub_Number 0)} {<stop>}) (C {($ Id.VSub_Number 0)} {<start>})] spids: [582 585 598 -1] ) (case_arm pat_list: [{<status>}] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {<status_of_proc>} {<-p>} {($ Id.VSub_DollarName PIDFILE)} {($ Id.VSub_DollarName DAEMON)} {($ Id.VSub_DollarName RSYSLOGD)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_QMark '?')} ) ] ) ] spids: [601 602 628 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [ {<echo>} { (DQ <'Usage: '> ($ Id.VSub_DollarName SCRIPTNAME) <' {start|stop|rotate|restart|force-reload|status}'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] spids: [631 632 652 -1] ) ] redirects: [] ) (C {<Id.Lit_Colon ':'>}) ] )