Changeset 4458

Show
Ignore:
Timestamp:
05/07/08 04:52:24 (7 months ago)
Author:
arighi
Message:

- fix: explicitly close rsync stdin when executing the rsync daemon by

si_prepareclient

When executed remotely via ssh rsync executed with --daemon tries to use stdin
as a socket to handle requests, instead of running in background and listening
for requests on the port given in the configuration file.

This fix explicitly closes the stdin of the spawned rsync daemon in
si_prepareclient, allowing to execute it remotely via ssh.

See also:
http://www.mail-archive.com/sisuite-users@lists.sourceforge.net/msg04519.html

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/sbin/si_prepareclient

    r4417 r4458  
    11391139     
    11401140        # Start up the new one. 
    1141         SystemImager::UseYourOwnKernel::run_cmd("rsync --daemon --port=$RSYNC_PORT --config=$rsyncd_conf_file", 0, 0); 
     1141        SystemImager::UseYourOwnKernel::run_cmd("rsync --daemon --port=$RSYNC_PORT --config=$rsyncd_conf_file </dev/null", 0, 0); 
    11421142     
    11431143        # Give a few seconds for the new daemon to start. 
     
    11541154      # still need to sleep 
    11551155      sleep(2); 
    1156       SystemImager::UseYourOwnKernel::run_cmd("rsync --daemon --port=$RSYNC_PORT --config=$rsyncd_conf_file", 0, 0); 
     1156      SystemImager::UseYourOwnKernel::run_cmd("rsync --daemon --port=$RSYNC_PORT --config=$rsyncd_conf_file </dev/null", 0, 0); 
    11571157      sleep(3); 
    11581158    }