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