From 4867051f3a2fbe81b9a1d0584e5fce61c6d147d2 Mon Sep 17 00:00:00 2001 From: afresh1 Date: Thu, 6 Jan 2022 19:27:01 +0000 Subject: [PATCH] Switch fw_update -D to instead -F The perl version of fw_update used -D for something else and although the mneumonic isn't as good, the conflict was worse. Requested by deraadt@ --- usr.sbin/fw_update/fw_update.8 | 8 ++++---- usr.sbin/fw_update/fw_update.sh | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/usr.sbin/fw_update/fw_update.8 b/usr.sbin/fw_update/fw_update.8 index 92c99409cad..d9413bf41ab 100644 --- a/usr.sbin/fw_update/fw_update.8 +++ b/usr.sbin/fw_update/fw_update.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fw_update.8,v 1.1 2022/01/05 16:28:19 afresh1 Exp $ +.\" $OpenBSD: fw_update.8,v 1.2 2022/01/06 19:27:01 afresh1 Exp $ .\" .\" Copyright (c) 2011 Alexander Hall .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 5 2022 $ +.Dd $Mdocdate: January 6 2022 $ .Dt FW_UPDATE 8 .Os .Sh NAME @@ -22,7 +22,7 @@ .Nd install non-free firmware packages .Sh SYNOPSIS .Nm -.Op Fl adDnv +.Op Fl adFnv .Op Fl p Ar path .Op Ar driver | file ... .Sh DESCRIPTION @@ -62,7 +62,7 @@ a driver. If used in conjunction with .Fl a , delete firmware for all drivers. -.It Fl D +.It Fl F Download drivers only. By default downloads to the current directory. Secifying a URL with diff --git a/usr.sbin/fw_update/fw_update.sh b/usr.sbin/fw_update/fw_update.sh index c1ed4c3db63..983a0d4b6b0 100644 --- a/usr.sbin/fw_update/fw_update.sh +++ b/usr.sbin/fw_update/fw_update.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: fw_update.sh,v 1.24 2022/01/05 16:32:46 afresh1 Exp $ +# $OpenBSD: fw_update.sh,v 1.25 2022/01/06 19:27:01 afresh1 Exp $ # # Copyright (c) 2021 Andrew Hewus Fresh # @@ -275,13 +275,13 @@ usage() { } ALL=false -OPT_D= -while getopts :adDnp:v name +OPT_F= +while getopts :adFnp:v name do case "$name" in a) ALL=true ;; d) DELETE=true ;; - D) OPT_D=true ;; + F) OPT_F=true ;; n) DRYRUN=true ;; p) LOCALSRC="$OPTARG" ;; v) VERBOSE=true ;; @@ -310,7 +310,7 @@ if [ "$LOCALSRC" ]; then fi # "Download only" means local dir and don't install -if [ "$OPT_D" ]; then +if [ "$OPT_F" ]; then INSTALL=false LOCALSRC="${LOCALSRC:-.}" elif [ "$LOCALSRC" ]; then @@ -325,7 +325,7 @@ fi set -sA devices -- "$@" if "$DELETE"; then - [ "$OPT_D" ] && usage 22 + [ "$OPT_F" ] && usage 22 set -A installed if [ "${devices[*]:-}" ]; then -- 2.20.1