svn commit: r309907 - head/usr.sbin/bsdinstall/scripts
Devin Teske
dteske at FreeBSD.org
Mon Dec 12 18:24:42 UTC 2016
Author: dteske
Date: Mon Dec 12 18:24:41 2016
New Revision: 309907
URL: https://svnweb.freebsd.org/changeset/base/309907
Log:
Replace funny block with something easy to digest
Modified:
head/usr.sbin/bsdinstall/scripts/wlanconfig
Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 18:21:56 2016 (r309906)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 18:24:41 2016 (r309907)
@@ -43,19 +43,10 @@ country_set()
# Setup what was selected
# NB: Do not change order of arguments (or regdomain will be ignored)
#
- if [ "$2" ]; then
- ifconfig_args="${ifconfig_args}country $2"
- fi
- if [ "$1" ]; then
- if [ "$2" ]; then
- ifconfig_args="${ifconfig_args} "
- fi
- ifconfig_args="${ifconfig_args}regdomain $1"
- fi
- if [ ! "$ifconfig_args" ]; then
- # Nothing to do (everything was skipped)
- return $SUCCESS
- fi
+ [ "$2" ] && ifconfig_args="$ifconfig_args country $2"
+ [ "$1" ] && ifconfig_args="$ifconfig_args regdomain $1"
+ [ "$ifconfig_args" ] || return $SUCCESS # Nothing to do
+ ifconfig_args="${ifconfig_args# }"
# Regdomain/country cannot be applied while interface is running
iface_up=$( ifconfig -lu | grep -w $WLAN_IFACE )
More information about the svn-src-head
mailing list