rsync doesn't exit (is hanging) in script, but not on command
line!
Gian G. Spicuzza
gianspi at gsent.org
Tue Mar 7 17:10:29 GMT 2006
Hi,
I don't know much about perl, but I can suggest doing a little upgrading.
Perl is up to v5.8.8
Rsync is up to v2.6.7pre3
Your version of rsync is years old and is vulnerable to multiple
security advisories.
Thanks,
Gian
>I have two identical (HW&SW) linux servers in my network. On both there is a
>user called qipadmin, which can access over SSH to each other.
>I wrote a perl script, which should copy files with rsync from one server to
>the other. Below is the rsync command in the script.
>The script is invoked by the root user.
>
>system "su - qipadmin -c 'rsync -e ssh -p
>$otherip:/opt/named/current/conf/db.* /opt/named/current/conf --exclude
>*.jnl*'"
>
>rsync copies the files but the problem is, that the rsync command never
>exits (is hanging) and so the script cannot continue (unless I do manual
>kill of the rsync process):
>
>ps -ef | grep rsync
>root 21290 21259 0 10:54 ? 00:00:00 su - qipadmin -c rsync -e
>ssh -p 10.10.1.242:/opt/named/current/conf/db.*
>/opt/named/current/conf --exclude *.jnl*
>qipadmin 21291 21290 0 10:54 ? 00:00:00 rsync -e ssh -p
>10.10.1.242:/opt/named/current/conf/db.* /opt/named/current/conf --exclude
>*.jnl*
>qipadmin 21384 21291 0 10:54 ? 00:00:00 rsync -e ssh -p
>10.10.1.242:/opt/named/current/conf/db.* /opt/named/current/conf --exclude
>*.jnl*
>
>On the command line I can do the following without any problems (rsync exits
>successfully):
>
>su - qipadmin -c 'rsync -e ssh -p 10.10.1.242:/opt/named/current/conf/db.*
>/opt/named/current/conf --exclude *.jnl*'
>
>
>What is the difference between
>
>system "<cmd>" (perl)
>
>and
>
><cmd> (shell command line)?
>
>Or is there a bug in rsync?
>
>additional infos:
>- rsync version: 2.5.7
>- kernel: 2.4.32
>- perl: 5.8.0
>
>
>I hope there is somebody who can help me. I'm very frustrated.
>
>
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________
>Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
>
>rsync mailing list
>rsync at lists.samba.org
>https://lists.samba.org/mailman/listinfo/rsync
>
>
More information about the rsync
mailing list