Update - in fact if I run my script from a 'site exec etc' command via ftp it also gets stuck with rsync.

To recap, this shell script works perfectly from a telnet terminal, but NOT from the Hijack menu or by 'site exec...'

So, it appears that rsync won't run properly if there's no terminal involved, even though it's not actually printing to it as I'm capturing the output for manipulation first.

I can only think it's rsync because everything prior is executed, rsync runs but nothing after gets done until I kill the 2 rsync processes that are started.

The code I'm using is:-

killall -INT player
swapon -a
rwm
RioSYNCout=$(rsync \
$OPTS \
--empeg-progress \
--stats \
--times \
--recursive \
--delete \
--copy-unsafe-links \
--exclude=config.ini \
--exclude=lost+found \
--exclude='\.*' \
$RSYNCSERVER::empeg/drive? / ) || die 8 "Oops - RSYNC error $?"


rwm executes and then rsync, but nothing more until I kill rsync, then 'die' displays the RSYNC error message - return code is 137, but I suspect that is due to me killing the processes.

I also tried it without the --empeg-progress option but it made no difference.

I'm stumped - any suggestions?