Re: lftp 4.5.4

Mattias Bergvall <[email protected]>
Newsgroups gmane.network.lftp.user
Message-ID <CAA3cMzHts6EWAq76TupO6GpOP48UPMdh+iATVDdf95K3qq2=yQ@mail.gmail.com>
Hi!

(using v 4.5.2)

I wonder how to prevent retries and to make LFTP fail-exit on connection
problems (when the server is down, for instance).

I have a command file like this:

set ftp:use-feat false
set dns:fatal-timeout 50
set net:max-retries 1
set cmd:fail-exit true
set ftp:sync-mode true
set ftp:use-site-utime false
set net:connection-limit 1
set ftp:nop-interval 15
set net:timeout 30
open ilprt1.ilnet.se
cd "/hold"
put xxx -o yyy

and get these reoccuring attempts until it succeeds:

---- Resolving host address...
---- 1 address found: 10.53.11.35
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Resolving host address...
---- 1 address found: 10.53.11.35
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Resolving host address...
---- 1 address found: 10.53.11.35
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Socket error (Connection refused) - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
**** Timeout - reconnecting
---- Closing control socket
---- Connecting to ilprt1.ilnet.se (10.53.11.35) port 21
<--- 220 EFI FTP Print server ready.
---> USER vidare
...

Is there any option I can use to make it abort and fail with non-zero
return code instead of retrying?

Thanks!

BR
Mattias Bergvall

_______________________________________________
lftp mailing list
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.