diff options
author | beck <beck@openbsd.org> | 2019-11-10 21:11:01 +0000 |
---|---|---|
committer | beck <beck@openbsd.org> | 2019-11-10 21:11:01 +0000 |
commit | 21d9f5864fb2172ea9edfd23be335fa368ff9779 (patch) | |
tree | 8c17d8e6d4f738f53f7ffd9a99893f00c1ef97ed /usr.sbin/sysupgrade | |
parent | Consistently use _rcctl enable foo_ in examples, it's simpler and less (diff) | |
download | wireguard-openbsd-21d9f5864fb2172ea9edfd23be335fa368ff9779.tar.xz wireguard-openbsd-21d9f5864fb2172ea9edfd23be335fa368ff9779.zip |
Opportunisticly run fw_update before rebooting to run the upgrade.
Warn if it fails, but allow the upgrade to continue for now.
discussed with many, refinements by naddy@ sthen@
"commit something" deraadt@
Diffstat (limited to 'usr.sbin/sysupgrade')
-rw-r--r-- | usr.sbin/sysupgrade/sysupgrade.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/sysupgrade/sysupgrade.sh b/usr.sbin/sysupgrade/sysupgrade.sh index 9048fbd660e..5a8f34ca7ab 100644 --- a/usr.sbin/sysupgrade/sysupgrade.sh +++ b/usr.sbin/sysupgrade/sysupgrade.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: sysupgrade.sh,v 1.30 2019/11/03 18:22:45 florian Exp $ +# $OpenBSD: sysupgrade.sh,v 1.31 2019/11/10 21:11:01 beck Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org> @@ -122,8 +122,10 @@ fi if $SNAP; then URL=${MIRROR}/snapshots/${ARCH}/ + FWURL=http://firmware.openbsd.org/firmware/snapshots/ else URL=${MIRROR}/${NEXT_VERSION}/${ARCH}/ + FWURL=http://firmware.openbsd.org/firmware/${NEXT_VERSION}/ fi if [[ -e ${SETSDIR} ]]; then @@ -204,6 +206,9 @@ rm -f /home/_sysupgrade/{${CLEAN}} __EOT fi +echo Fetching updated firmware. +fw_update -p ${FWURL} || echo "Warning: firmware not updated." + install -F -m 700 bsd.rd /bsd.upgrade sync |