(CommandList children: [ (C {(set)} {(-e)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:DAEMON) op:Equal rhs:{(/usr/bin/rsync)} spids:[50])] spids: [50] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RSYNC_ENABLE) op:Equal rhs:{(false)} spids:[53])] spids: [53] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RSYNC_OPTS) op:Equal rhs:{(SQ )} spids:[56])] spids: [56] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RSYNC_DEFAULTS_FILE) op: Equal rhs: {(/etc/default/rsync)} spids: [60] ) ] spids: [60] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RSYNC_CONFIG_FILE) op: Equal rhs: {(/etc/rsyncd.conf)} spids: [63] ) ] spids: [63] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RSYNC_PID_FILE) op: Equal rhs: {(/var/run/rsync.pid)} spids: [66] ) ] spids: [66] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RSYNC_NICE_PARM) op:Equal rhs:{(SQ )} spids:[69])] spids: [69] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:RSYNC_IONICE_PARM) op:Equal rhs:{(SQ )} spids:[73])] spids: [73] ) (AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-x)} {($ VSub_Name '$DAEMON')}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (C {(.)} {(/lib/lsb/init-functions)}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-s)} {($ VSub_Name '$RSYNC_DEFAULTS_FILE')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(.)} {($ VSub_Name '$RSYNC_DEFAULTS_FILE')}) (Case to_match: {(DQ (x) ($ VSub_Name '$RSYNC_ENABLE'))} arms: [ (case_arm pat_list: [{(xtrue)} {(xfalse)}] spids: [125 128 130 16777215] ) (case_arm pat_list: [{(xinetd)}] action: [(ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})] spids: [133 134 141 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(log_failure_msg)} { (DQ ('Value of RSYNC_ENABLE in ') ($ VSub_Name '$RSYNC_DEFAULTS_FILE') (" must be either 'true' or 'false';") ) } ) (C {(log_failure_msg)} {(DQ ('not starting rsync daemon.'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [144 145 168 16777215] ) ] spids: [115 122 171] ) (Case to_match: {(DQ (x) ($ VSub_Name '$RSYNC_NICE'))} arms: [ (case_arm pat_list: [ {(x) (Lit_Other '[') (0-9) (Lit_Other ']')} {(x1) (Lit_Other '[') (0-9) (Lit_Other ']')} ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RSYNC_NICE_PARM) op: Equal rhs: {(DQ ('--nicelevel ') ($ VSub_Name '$RSYNC_NICE'))} spids: [195] ) ] spids: [195] ) ] spids: [184 193 200 16777215] ) (case_arm pat_list:[{(x)}] spids:[203 204 206 16777215]) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(log_warning_msg)} { (DQ ('Value of RSYNC_NICE in ') ($ VSub_Name '$RSYNC_DEFAULTS_FILE') (' must be a value between 0 and 19 (inclusive);') ) } ) (C {(log_warning_msg)} {(DQ ('ignoring RSYNC_NICE now.'))}) ] spids: [209 210 228 16777215] ) ] spids: [174 181 231] ) (Case to_match: {(DQ (x) ($ VSub_Name '$RSYNC_IONICE'))} arms: [ (case_arm pat_list: [{(x-c) (Lit_Other '[') (123) (Lit_Other ']') (Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:RSYNC_IONICE_PARM) op: Equal rhs: {(DQ ($ VSub_Name '$RSYNC_IONICE'))} spids: [251] ) ] spids: [251] ) ] spids: [244 249 255 16777215] ) (case_arm pat_list:[{(x)}] spids:[258 259 261 16777215]) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(log_warning_msg)} { (DQ ('Value of RSYNC_IONICE in ') ($ VSub_Name '$RSYNC_DEFAULTS_FILE') (' must be -c1, -c2 or -c3;') ) } ) (C {(log_warning_msg)} {(DQ ('ignoring RSYNC_IONICE now.'))}) ] spids: [264 265 283 16777215] ) ] spids: [234 241 286] ) ] spids: [16777215 107] ) ] spids: [16777215 288] ) (C {(export)} {(Lit_VarLike 'PATH=') (DQ (BracedVarSub token: <VSub_Name PATH> suffix_op: (StringUnary op_id:VTest_ColonPlus arg_word:{($ VSub_Name '$PATH') (':')}) spids: [295 300] ) ('/usr/sbin:/sbin') ) } ) (FuncDef name: rsync_start body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-s)} {(DQ ($ VSub_Name '$RSYNC_CONFIG_FILE'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_failure_msg)} {(DQ ('missing or empty config file ') ($ VSub_Name '$RSYNC_CONFIG_FILE'))} ) (C {(log_end_msg)} {(1)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [16777215 327] ) ] spids: [16777215 348] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$RSYNC_IONICE_PARM'))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(-x)} {(/usr/bin/ionice)} {(Lit_Other ']')}) (SimpleCommand words: [ {(/usr/bin/ionice)} {(DQ ($ VSub_Name '$RSYNC_IONICE_PARM'))} {(true)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [388] ) ] ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(/usr/bin/ionice)} {(DQ ($ VSub_Name '$RSYNC_IONICE_PARM'))} {(-p) ($ VSub_Dollar '$$')} ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [404] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [408] ) ] ) ] spids: [16777215 392] ) ] spids: [16777215 412] ) (If arms: [ (if_arm cond: [ (C {(start-stop-daemon)} {(--start)} {(--quiet)} {(--background)} {(--pidfile)} {($ VSub_Name '$RSYNC_PID_FILE')} {(--make-pidfile)} {($ VSub_Name '$RSYNC_NICE_PARM')} {(--exec)} {($ VSub_Name '$DAEMON')} {(--)} {(--no-detach)} {(--daemon)} {(--config)} {(DQ ($ VSub_Name '$RSYNC_CONFIG_FILE'))} {($ VSub_Name '$RSYNC_OPTS')} ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(0)} spids:[461])] spids: [461] ) (C {(sleep)} {(1)}) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [ {(kill)} {(-0)} { (CommandSubPart command_list: (CommandList children: [ (C {(cat)} {($ VSub_Name '$RSYNC_PID_FILE')}) ] ) left_token: <Left_CommandSub '$('> spids: [478 482] ) } ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [484] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [487] ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_failure_msg)} {(DQ ('rsync daemon failed to start'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:rc) op: Equal rhs: {(1)} spids: [501] ) ] spids: [501] ) ] spids: [16777215 491] ) ] spids: [16777215 505] ) ] spids: [16777215 458] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:rc) op:Equal rhs:{(1)} spids:[511])] spids: [511] ) ] spids: [508 515] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$rc')} {(-eq)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(log_end_msg)} {(0)})] spids: [16777215 531] ) ] else_action: [ (C {(log_end_msg)} {(1)}) (C {(rm)} {(-f)} {($ VSub_Name '$RSYNC_PID_FILE')}) ] spids: [539 554] ) ] spids: [309] ) spids: [305 308] ) (Case to_match: {(DQ ($ VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)}] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(DQ ($ VSub_Name '$RSYNC_ENABLE'))}) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_daemon_msg)} {(DQ ('Starting rsync daemon'))} {(DQ (rsync))}) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-s)} {($ VSub_Name '$RSYNC_PID_FILE')} {(Lit_Other ']')} ) (SimpleCommand words: [ {(kill)} {(-0)} { (CommandSubPart command_list: (CommandList children: [ (C {(cat)} {($ VSub_Name '$RSYNC_PID_FILE')}) ] ) left_token: <Left_CommandSub '$('> spids: [613 617] ) } ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [619] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [622] ) ] ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_progress_msg)} {(DQ ('apparently already running'))}) (C {(log_end_msg)} {(0)}) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [16777215 626] ) ] spids: [16777215 646] ) (C {(rsync_start)}) ] spids: [16777215 583] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-s)} {(DQ ($ VSub_Name '$RSYNC_CONFIG_FILE'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$VERBOSE'))} {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_Other ']')} ) (C {(log_warning_msg)} { (DQ ('rsync daemon not enabled in ') ($ VSub_Name '$RSYNC_DEFAULTS_FILE') (', not starting...') ) } ) ] ) ] spids: [16777215 668] ) ] spids: [16777215 695] ) ] spids: [652 698] ) ] spids: [572 573 701 16777215] ) (case_arm pat_list: [{(stop)}] action: [ (C {(log_daemon_msg)} {(DQ ('Stopping rsync daemon'))} {(DQ (rsync))}) (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--oknodo)} {(--pidfile)} {($ VSub_Name '$RSYNC_PID_FILE')} ) (C {(log_end_msg)} {($ VSub_QMark '$?')}) (C {(rm)} {(-f)} {($ VSub_Name '$RSYNC_PID_FILE')}) ] spids: [704 705 744 16777215] ) (case_arm pat_list: [{(reload)} {(force-reload)}] action: [ (C {(log_warning_msg)} {(DQ ('Reloading rsync daemon: not needed, as the daemon'))}) (C {(log_warning_msg)} {(DQ ('re-reads the config file whenever a client connects.'))}) ] spids: [748 751 768 16777215] ) (case_arm pat_list: [{(restart)}] action: [ (C {(set)} {(Lit_Other '+') (e)}) (If arms: [ (if_arm cond: [(Sentence child:(C {($ VSub_Name '$RSYNC_ENABLE')}) terminator:<Op_Semi ';'>)] action: [ (C {(log_daemon_msg)} {(DQ ('Restarting rsync daemon'))} {(DQ (rsync))}) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-s)} {($ VSub_Name '$RSYNC_PID_FILE')} {(Lit_Other ']')} ) (SimpleCommand words: [ {(kill)} {(-0)} { (CommandSubPart command_list: (CommandList children: [ (C {(cat)} {($ VSub_Name '$RSYNC_PID_FILE')}) ] ) left_token: <Left_CommandSub '$('> spids: [817 821] ) } ] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [823] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [826] ) ] ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DPipe] children: [ (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--oknodo)} {(--pidfile)} {($ VSub_Name '$RSYNC_PID_FILE')} ) (C {(true)}) ] ) (C {(sleep)} {(1)}) ] spids: [16777215 830] ) ] else_action: [ (C {(log_warning_msg)} {(DQ ('rsync daemon not running, attempting to start.'))}) (C {(rm)} {(-f)} {($ VSub_Name '$RSYNC_PID_FILE')}) ] spids: [855 872] ) (C {(rsync_start)}) ] spids: [16777215 787] ) ] else_action: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-s)} {(DQ ($ VSub_Name '$RSYNC_CONFIG_FILE'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$VERBOSE'))} {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_Other ']')} ) (C {(log_warning_msg)} { (DQ ('rsync daemon not enabled in ') ($ VSub_Name '$RSYNC_DEFAULTS_FILE') (', not starting...') ) } ) ] ) ] spids: [16777215 894] ) ] spids: [16777215 921] ) ] spids: [878 924] ) ] spids: [772 773 927 16777215] ) (case_arm pat_list: [{(status)}] action: [ (C {(status_of_proc)} {(-p)} {($ VSub_Name '$RSYNC_PID_FILE')} {(DQ ($ VSub_Name '$DAEMON'))} {(rsync)} ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_QMark '$?')}) ] spids: [931 932 956 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(echo)} {(DQ ('Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}'))} ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [959 960 16777215 974] ) ] spids: [563 569 974] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )