diff options
author | 2013-10-18 23:25:02 +0000 | |
---|---|---|
committer | 2013-10-18 23:25:02 +0000 | |
commit | 12767bad68967c56b77c34bd16d1cbc84d87a331 (patch) | |
tree | 08d59b7d8149d0bff066e810c06e824dda4047ab | |
parent | UTF-8 support for wsdisplay emulation modes. Both vt100 and sun emulation (diff) | |
download | wireguard-openbsd-12767bad68967c56b77c34bd16d1cbc84d87a331.tar.xz wireguard-openbsd-12767bad68967c56b77c34bd16d1cbc84d87a331.zip |
don't silence stderr from pkg_add when running in verbose mode
suggested by Alexander Holupirek
ok rpe@
-rw-r--r-- | usr.sbin/fw_update/fw_update.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.sbin/fw_update/fw_update.sh b/usr.sbin/fw_update/fw_update.sh index 696b7328bb0..727ae17c30f 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.16 2013/08/20 22:42:08 halex Exp $ +# $OpenBSD: fw_update.sh,v 1.17 2013/10/18 23:25:02 halex Exp $ # Copyright (c) 2011 Alexander Hall <alexander@beard.se> # # Permission to use, copy, modify, and distribute this software for any @@ -40,6 +40,14 @@ setpath() { export PKG_PATH=http://firmware.openbsd.org/firmware/$version/ } +perform() { + if [ "$verbose" ]; then + "$@" + else + "$@" 2>/dev/null + fi +} + all=false verbose= nop= @@ -100,11 +108,11 @@ fi # Install missing firmware if [ "$install" ]; then verbose "Installing firmware files:$install." - $PKG_ADD $nop $verbose $install 2>/dev/null + perform $PKG_ADD $nop $verbose $install fi # Update installed firmware if [ "$update" ]; then verbose "Updating firmware files:$update." - $PKG_ADD $extra $nop $verbose -u $update 2>/dev/null + perform $PKG_ADD $extra $nop $verbose -u $update fi |