svn commit: r309944 - head/usr.sbin/bsdinstall/scripts
Devin Teske
dteske at FreeBSD.org
Mon Dec 12 21:04:12 UTC 2016
Author: dteske
Date: Mon Dec 12 21:04:11 2016
New Revision: 309944
URL: https://svnweb.freebsd.org/changeset/base/309944
Log:
Fix invalid parameter expansion (change $@ to "$@")
Without quotes, $@ loses its special meanining (see below)
% sh -c 'echo $@' /bin/sh " 1 " " 2 "
1 2
% sh -c 'echo "$@"' /bin/sh " 1 " " 2 "
1 2
The quotes are required to get ARGV to be unperterped
Modified:
head/usr.sbin/bsdinstall/scripts/wlanconfig
Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 21:02:34 2016 (r309943)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 21:04:11 2016 (r309944)
@@ -286,7 +286,7 @@ if echo $ENCRYPTION | grep -q 'PSK'; the
"SSID" 1 0 "$NETWORK" 1 12 0 0 2 \
"Password" 2 0 "" 2 12 15 63 1 \
2>&1 1>&3
- ) || exec "$0" $@
+ ) || exec "$0" "$@"
exec 3>&-
awk 'sub(/^\t/,"")||1' \
>> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF
@@ -308,7 +308,7 @@ elif echo $ENCRYPTION | grep -q EAP; the
"Username" 2 0 "" 2 12 25 63 0 \
"Password" 3 0 "" 3 12 25 63 1 \
2>&1 1>&3
- ) || exec "$0" $@
+ ) || exec "$0" "$@"
exec 3>&-
awk 'sub(/^\t/,"")||1' \
>> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF
@@ -337,7 +337,7 @@ elif echo $ENCRYPTION | grep -q WEP; the
"SSID" 1 0 "$NETWORK" 1 12 0 0 2 \
"WEP Key 0" 2 0 "" 2 12 15 0 1 \
2>&1 1>&3
- ) || exec "$0" $@
+ ) || exec "$0" "$@"
awk 'sub(/^\t/,"")||1' \
>> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF
network={
More information about the svn-src-head
mailing list