Hi Sashank999
... Is there a way to add timeout option for tce-load or wget ? Or else a retry option for wget ? ...
wget has both of those options (-T and -c):
tc@E310:~$ busybox wget --help
BusyBox v1.29.3 (2018-12-19 15:29:37 UTC) multi-call binary.
Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-T SEC Network read timeout is SEC seconds
-O FILE Save to FILE ('-' for stdout)
-U STR Use STR for User-Agent header
-Y on/off Use proxy
tc@E310:~$
If you search the tce-* scripts:
tc@E310:~$ grep wget /usr/bin/tce-*
/usr/bin/tce-audit: wget -cq -P /tmp "$MIRROR"/"$TARGET" 2>/tmp/fetch_result
/usr/bin/tce-fetch.sh: wget -cq -O- "$MIRROR"/"${1//-KERNEL.tcz/-${KERNELVER}.tcz}"
/usr/bin/tce-fetch.sh: wget -cq "$MIRROR"/"$F"
/usr/bin/tce-load: wget -cq "$MIRROR"/"$1".md5.txt 2>/dev/null
/usr/bin/tce-load: wget -c "$MIRROR"/"$1"
/usr/bin/tce-load: if (system("rm -f "depfile"; wget -c -P "optional" "mirror"/"name".dep 2>/dev/null") == 0 && ! SUPPRESS)
/usr/bin/tce-status: busybox wget --spider -q "$MIRROR"/"$E" 2>/dev/null || echo "$E not found!"
/usr/bin/tce-update: wget -cq "$MIRROR"/"$1"
/usr/bin/tce-update: wget -cq "$MIRROR"/"$1" # Either there was no zsync file on the server, or it failed
tc@E310:~$
you'll see it uses the -c option for wget. You can add a -T option to the commands above if you think it will help you. Then add
those 4 files to your backup.
The timeout is being used to make sure the command does not hangup forever, not to try to make intermittent network connections
more tolerable. According to the busybox config file, the timeout for wget should default to 10 seconds.
... Sometimes the connection to repo just breaks in the middle (happens like once or twice a month, so no bother). But when it breaks when I am downloading an extension that has like 100 tree deps (for example) it would take another 15 minutes for the Apps or tce-load to do the whole thing again. ...
If tce-load gets interrupted, it resumes with the file that failed to download when you run it again.