Commit b61c6a82 authored by Loic's avatar Loic
Browse files

HBSD: use fetch_update for 'download only'



We now use the fetch_update for 'download only' function.
This function has the advantage to control the checksum of the download file.
Please note that there is no more resumption of the interrupted download.
Reported-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
Signed-off-by: Loic's avatarLoic <loic.f@hardenedbsd.org>
parent 762bdf24
......@@ -406,7 +406,12 @@ fetch_update() {
fi
fi
# Step 3: Untar the update archive
# Step 3: Check whether to continue
if [ ${downloadonly} = 1 ]; then
exit 0
fi
# Step 4: Untar the update archive
${TAR} -xf ${tmpdir}/update.tar \
-C ${tmpdir}
res=${?}
......@@ -1258,9 +1263,8 @@ main() {
fi
if [ ${downloadonly} = 1 ]; then
debug_print "[*] Download the latest update to the current folder."
${FETCH} ${net_flag} -o update-$(get_version).tar -arR \
${baseurl}/update-$(get_version).tar
debug_print "[*] Download the latest update in ${tmpdir}"
fetch_update
exit 0
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment