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