Better handle ftp errors in fw_update
authorafresh1 <afresh1@openbsd.org>
Wed, 15 Nov 2023 02:00:02 +0000 (02:00 +0000)
committerafresh1 <afresh1@openbsd.org>
Wed, 15 Nov 2023 02:00:02 +0000 (02:00 +0000)
commiteaf1d08205642fe962061725203e6c89bd796574
tree763bfc926a7c9d431fe41cc9b8f11a7c41499c0c
parent8e9ff1e61e136829a715052f888f67d3617fc787
Better handle ftp errors in fw_update

Trap STDERR to post-process it looking for 404 errors to handle them differently.

The fetch method now also returns different error codes for errors that can
continue on.  Currently only 404 is special and everything else should cause
fw_update to exit early without trying all the files.

Exit early if the SHA256.sig gets a 404 because that is required to figure out
what valid firmware are.
usr.sbin/fw_update/fw_update.sh