Skip to content

Commit

Permalink
update: move -K option to -x
Browse files Browse the repository at this point in the history
We need the former to be a bit more in line with the -B/-P options.
  • Loading branch information
fichtner committed Jun 6, 2023
1 parent 97a274b commit 113ec3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/update/opnsense-update.8
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd February 7, 2023
.Dd June 8, 2023
.Dt OPNSENSE-UPDATE 8
.Os
.Sh NAME
Expand Down Expand Up @@ -126,8 +126,6 @@ Otherwise, the
utility is used to verify a set signature.
The default is off meaning secure, unless the package mirror
configuration does not use fingerprints.
.It Fl K
Return the subscription key if it exists in the release URL.
.It Fl k
Select the kernel.
.It Fl L
Expand Down Expand Up @@ -209,6 +207,8 @@ after each individual step.
Set debug mode for shell script output.
.It Fl v
Print the latest set version.
.It Fl x
Return the subscription key if it exists in the release URL.
.It Fl z
Use the snapshot directory to fetch sets regardless of what is
currently configured in the repository file.
Expand Down
10 changes: 5 additions & 5 deletions src/update/opnsense-update.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ if [ "${IDENT}" != "${IDENT#*-}" ]; then
DO_DEVICE="-D ${IDENT#*-}"
fi

while getopts A:a:BbCcD:defGiKkLl:Mm:n:OPpRr:SsTt:UuVvz OPT; do
while getopts A:a:BbCcD:defGiKkLl:Mm:n:OPpRr:SsTt:UuVvxz OPT; do
case ${OPT} in
A)
DO_MIRRORABI="-A ${OPTARG}"
Expand Down Expand Up @@ -286,9 +286,6 @@ while getopts A:a:BbCcD:defGiKkLl:Mm:n:OPpRr:SsTt:UuVvz OPT; do
i)
DO_INSECURE="-i"
;;
K)
DO_MIRROR="-K"
;;
k)
DO_KERNEL="-k"
;;
Expand Down Expand Up @@ -353,6 +350,9 @@ while getopts A:a:BbCcD:defGiKkLl:Mm:n:OPpRr:SsTt:UuVvz OPT; do
v)
DO_VERSION="-v"
;;
x)
DO_MIRROR="-x"
;;
z)
DO_SNAPSHOT="-z"
;;
Expand Down Expand Up @@ -438,7 +438,7 @@ if [ "${DO_MIRROR}" = "-M" ]; then
# only print mirror URL
mirror_abi
exit 0
elif [ "${DO_MIRROR}" = "-K" ]; then
elif [ "${DO_MIRROR}" = "-x" ]; then
# only print mirror subscription key while
# making sure it actually looks like a key
URL=$(mirror_abi raw | sed -n 's/.*\/\([^\/]*\)\/${ABI}\/.*/\1/p' |
Expand Down

0 comments on commit 113ec3e

Please sign in to comment.