svn commit: r309946 - head/usr.sbin/bsdinstall/scripts
Devin Teske
dteske at FreeBSD.org
Mon Dec 12 21:16:38 UTC 2016
Author: dteske
Date: Mon Dec 12 21:16:37 2016
New Revision: 309946
URL: https://svnweb.freebsd.org/changeset/base/309946
Log:
Use awk the following (more succinct) awk syntax:
condition1 { action1 }
condition2 { action2 }
instead of the following syntax:
{
if (condition1) { action1 }
else if (condition2) { action2 }
}
Modified:
head/usr.sbin/bsdinstall/scripts/wlanconfig
Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 21:11:55 2016 (r309945)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 21:16:37 2016 (r309946)
@@ -317,13 +317,9 @@ elif echo $ENCRYPTION | grep -q EAP; the
scan_ssid=$SCANSSID
key_mgmt=WPA-EAP$(
echo "$USERPASS" | awk '
- {
- if (NR == 1) {
- printf " identity=\"%s\"\n", $1;
- } else if (NR == 2) {
- printf " password=\"%s\"\n", $1;
- }
- }' )
+ NR == 1 { printf "\n\t\tidentity=\"%s\"", $1; }
+ NR == 2 { printf "\n\t\tpassword=\"%s\"", $1; }
+ ' )
priority=5
}
EOF
More information about the svn-src-all
mailing list