diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-09-05 08:16:35 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-09-05 08:16:35 +0000 |
commit | 8de328080d7d30222c7db7dbb1d701b904f5e08d (patch) | |
tree | 82f520f8abd5ee52b6b7e93750997e514e4e7d2e | |
parent | a9faf5b89a8d31370f6622a5ab5b263203edd1cd (diff) |
don't let pkg_add turn interactive, and waive the @ask-update questions.
okay sthen@
halex "you know best"...
problem(s) reported by claudio@
-rw-r--r-- | usr.sbin/fw_update/fw_update.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/fw_update/fw_update.sh b/usr.sbin/fw_update/fw_update.sh index c0a03451d2f..f322606a0fd 100644 --- a/usr.sbin/fw_update/fw_update.sh +++ b/usr.sbin/fw_update/fw_update.sh @@ -1,6 +1,6 @@ #!/bin/sh -# $OpenBSD: fw_update.sh,v 1.10 2012/01/26 20:20:18 halex Exp $ +# $OpenBSD: fw_update.sh,v 1.11 2012/09/05 08:16:34 espie Exp $ # Copyright (c) 2011 Alexander Hall <alexander@beard.se> # # Permission to use, copy, modify, and distribute this software for any @@ -19,7 +19,7 @@ DRIVERS="acx athn bwi ipw iwi iwn malo otus pgt rsu uath ueagle upgt urtwn uvideo wpi" -PKG_ADD="pkg_add -D repair" +PKG_ADD="pkg_add -I -D repair" usage() { echo "usage: ${0##*/} [-nv]" >&2 @@ -56,10 +56,12 @@ dmesg=$(cat /var/run/dmesg.boot; echo; dmesg) install= update= +extra= for driver in $DRIVERS; do if print -r -- "$installed" | grep -q "^${driver}-firmware-"; then update="$update ${driver}-firmware" + extra="$extra -Dupdate_${driver}-firmware" elif print -r -- "$dmesg" | grep -q "^${driver}[0-9][0-9]* at "; then install="$install ${driver}-firmware" fi @@ -82,5 +84,5 @@ fi # Update installed firmware if [ "$update" ]; then verbose "Updating firmware files:$update." - $PKG_ADD $nop $verbose -u $update 2>/dev/null + $PKG_ADD $extra $nop $verbose -u $update 2>/dev/null fi |