=================================================================== RCS file: /cvs/openbsd/fw_update/fw_install.sh,v retrieving revision 1.28 retrieving revision 1.30 diff -u -r1.28 -r1.30 --- openbsd/fw_update/fw_install.sh 2021/11/17 02:37:01 1.28 +++ openbsd/fw_update/fw_install.sh 2021/11/18 02:15:34 1.30 @@ -1,11 +1,6 @@ #!/bin/ksh set -e -scan_dmesg() { - # no bsort for now - sed -n "$1" /var/run/dmesg.boot -} - # Fake up some things from install.sub that we don't need to actually do prefetcharea_fs_list() { echo "${DESTDIR}/tmp" @@ -80,6 +75,7 @@ VNAME=$(sysctl -n kern.osrelease) VERSION="${VNAME%.*}${VNAME#*.}" FWDIR="$VNAME" +MODE=${MODE:-install} # TODO: We need the firmware for the system we just installed # not the one we booted from. For example: @@ -92,7 +88,7 @@ # Otherwise, the fw_update after first boot will fix it up for us. HTTP_FWDIR=$FWDIR -set -- $(scan_dmesg "/^OpenBSD $VNAME\([^ ]*\).*$/s//\1/p") +set -- sed -n "/^OpenBSD $VNAME\([^ ]*\).*$/s//\1/p" /var/run/dmesg.boot [[ $1 == -!(stable) ]] && HTTP_FWDIR=snapshots FWURL=http://firmware.openbsd.org/firmware/${HTTP_FWDIR}