(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 children: [(C {(test)} {(-x)} {($ VSub_Name "$DAEMON")}) (C {(exit)} {(0)})] op_id: Op_DPipe ) (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:[125128130-1]) (case_arm pat_list: [{(xinetd)}] action: [(C {(exit)} {(0)})] spids: [133 134 141 -1] ) (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."))}) (C {(exit)} {(1)}) ] spids: [144 145 168 -1] ) ] 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 -1] ) (case_arm pat_list:[{(x)}] spids:[203204206-1]) (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 -1] ) ] 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 -1] ) (case_arm pat_list:[{(x)}] spids:[258259261-1]) (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 -1] ) ] spids: [234 241 286] ) ] spids: [-1 107] ) ] spids: [-1 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)}) (C {(exit)} {(0)}) ] spids: [-1 327] ) ] spids: [-1 348] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr children: [ (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$RSYNC_IONICE_PARM"))} {(Lit_Other "]")} ) (AndOr children: [ (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] ) ] ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) 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: -1 arg_word: {(/dev/null)} spids: [404] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [408] ) ] ) ] spids: [-1 392] ) ] spids: [-1 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: -1 arg_word: {(/dev/null)} spids: [484] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [487] ) ] ) ] negated: True ) 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: [-1 491] ) ] spids: [-1 505] ) ] spids: [-1 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: [-1 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 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: -1 arg_word: {(/dev/null)} spids: [619] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [622] ) ] ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (C {(log_progress_msg)} {(DQ ("apparently already running"))}) (C {(log_end_msg)} {(0)}) (C {(exit)} {(0)}) ] spids: [-1 626] ) ] spids: [-1 646] ) (C {(rsync_start)}) ] spids: [-1 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 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...") ) } ) ] op_id: Op_DAmp ) ] spids: [-1 668] ) ] spids: [-1 695] ) ] spids: [652 698] ) ] spids: [572 573 701 -1] ) (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 -1] ) (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 -1] ) (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 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: -1 arg_word: {(/dev/null)} spids: [823] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [826] ) ] ) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) ] action: [ (AndOr children: [ (C {(start-stop-daemon)} {(--stop)} {(--quiet)} {(--oknodo)} {(--pidfile)} {($ VSub_Name "$RSYNC_PID_FILE")} ) (C {(true)}) ] op_id: Op_DPipe ) (C {(sleep)} {(1)}) ] spids: [-1 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: [-1 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 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...") ) } ) ] op_id: Op_DAmp ) ] spids: [-1 894] ) ] spids: [-1 921] ) ] spids: [878 924] ) ] spids: [772 773 927 -1] ) (case_arm pat_list: [{(status)}] action: [ (C {(status_of_proc)} {(-p)} {($ VSub_Name "$RSYNC_PID_FILE")} {(DQ ($ VSub_Name "$DAEMON"))} {(rsync)} ) (C {(exit)} {($ VSub_QMark "$?")}) ] spids: [931 932 956 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(echo)} {(DQ ("Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}"))} ) (C {(exit)} {(1)}) ] spids: [959 960 -1 974] ) ] spids: [563 569 974] ) (C {(exit)} {(0)}) ] )