Hello!
I'm using an LFTP-Client (Version 3.4.7 on Solaris SunOS 5.9) to
reverse mirror directories to an FTP-Server (FileZilla, Windows XP
Embedded) over WLAN. This works very well, yet it frequently happens
that the connection breaks down for several minutes or even hours (if
the server is being shut down). This is no problem if the connection
breaks down while LFTP is retrieving directory information, as LFTP
stops when the timeouts run out. But if a file transfer is active while
the connection breaks down, LFTP retries forever. This may be wanted in
all other circumstances, but in my case I would like LFTP to stop
reconnecting and exit with an error message. I use a bash-script with
the following commands and settings:
/usr/bin/lftp << !FTP_TRANSFER
set net:timeout 10
set ftp:list-empty-ok true
set net:max-retries 2
set net:reconnect-interval-base 5
set net:reconnect-interval-multiplier 1
open ${FTPHOST}
user ${FTPUSR} ${FTPPW}
mirror -vvv -R --delete-first -L -e --max-errors=1 -p ${sourceDir}
${targetDir}
bye
!FTP_TRANSFER
I searched the man-page and the discussions on this group and tried
google to find an answer to my problem, but without success. So I would
greatly appreciate any help from the members of this group!
Thanks,
Michael Reidt