=================================================================== RCS file: /cvs/openbsd/fw_update/fw_install.sh,v retrieving revision 1.31 retrieving revision 1.35 diff -u -r1.31 -r1.35 --- openbsd/fw_update/fw_install.sh 2021/11/18 02:18:32 1.31 +++ openbsd/fw_update/fw_install.sh 2021/11/24 02:09:35 1.35 @@ -63,16 +63,9 @@ do_as _file "$@" } -# "fail" needs to be replaced with the "ask_yn" loop like in the installer. -_issue= -fail() { - echo $_issue >&2 - exit 1 -} - -VNAME=$(sysctl -n kern.osrelease) -VERSION="${VNAME%.*}${VNAME#*.}" -FWDIR="$VNAME" +VNAME=${VNAME:-$(sysctl -n kern.osrelease)} +VERSION=${VERSION:-"${VNAME%.*}${VNAME#*.}"} +FWDIR=${FWDIR:-$VNAME} MODE=${MODE:-install} # TODO: We need the firmware for the system we just installed @@ -94,7 +87,7 @@ FWPATTERNS="file:${0%/*}/firmware_patterns" # TODO: support srclocal installation of firmware somehow -fw_update() { +fw_install() { local _src=$1 _tmpfs_list _tmpfs _tmpsrc \ _t=Get _cfile="/tmp/SHA256" _pkgdir=${DESTDIR}/var/db/pkg \ _f _r _remove _i _installed @@ -246,4 +239,4 @@ done } -fw_update "$FWURL" +fw_install "$FWURL"