=================================================================== RCS file: /cvs/openbsd/fw_update/fw_install.sh,v retrieving revision 1.131 retrieving revision 1.135 diff -u -r1.131 -r1.135 --- openbsd/fw_update/fw_install.sh 2021/12/25 19:03:56 1.131 +++ openbsd/fw_update/fw_install.sh 2021/12/25 20:43:40 1.135 @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: fw_install.sh,v 1.131 2021/12/25 19:03:56 afresh1 Exp $ +# $OpenBSD: fw_install.sh,v 1.135 2021/12/25 20:43:40 afresh1 Exp $ # # Copyright (c) 2021 Andrew Hewus Fresh # @@ -132,8 +132,7 @@ # When we're not in the installer, the dmesg.boot can # contain multiple boots, so only look in the last one - _dmesgtail="$( echo ; sed -n 'H;/^OpenBSD/h;${g;p;}' /var/run/dmesg.boot | - grep -e "^[a-z][a-z]*[0-9]" -e " not configured " )" + _dmesgtail="$( echo ; sed -n 'H;/^OpenBSD/h;${g;p;}' /var/run/dmesg.boot )" grep -v '^[[:space:]]*#' "$FWPATTERNS" | while read -r _d _m; do @@ -184,14 +183,14 @@ set -sA _devices -- $( firmware_in_dmesg for _d in $( installed_firmware '*' '-firmware-' '*' ); do - echo "$( firmware_devicename "$_d" )" + firmware_devicename "$_d" done ) [ "${_devices[*]:-}" ] || return 0 for _d in "${_devices[@]}"; do - [[ $_last = $_d ]] && continue - echo $_d + [ "$_last" = "$_d" ] && continue + echo "$_d" _last="$_d" done } @@ -428,12 +427,8 @@ if [ -e "$f" ]; then if "$DOWNLOAD"; then - if "$VERBOSE"; then - "$INSTALL" && - echo "Verify ${f##*/}" || - echo "Keep/Verify ${f##*/}" - echo "Verify ${f##*/}" - fi + "$VERBOSE" && ! "$INSTALL" && + echo "Keep/Verify ${f##*/}" "$DRYRUN" || verify "$f" || continue "$INSTALL" || kept="$kept,$d" # else assume it was verified when downloaded