Date: Thu, 7 Dec 2017 03:57:12 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r326653 - stable/11/usr.sbin/bsdinstall/scripts Message-ID: <201712070357.vB73vC3F087284@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Thu Dec 7 03:57:11 2017 New Revision: 326653 URL: https://svnweb.freebsd.org/changeset/base/326653 Log: MFC r326094: Fix indentation in bsdinstall-created wpa_supplicant.conf r311690 (MFC of r309934) cleaned up some cases in bsdinstall to use heredocs but broke the indentation of the generated output, because <<- heredocs strip leading tabs. PR: 221982 Modified: stable/11/usr.sbin/bsdinstall/scripts/wlanconfig Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/wlanconfig Thu Dec 7 02:08:55 2017 (r326652) +++ stable/11/usr.sbin/bsdinstall/scripts/wlanconfig Thu Dec 7 03:57:11 2017 (r326653) @@ -280,14 +280,14 @@ if echo "$ENCRYPTION" | grep -q PSK; then 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - psk="$PASS" - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<EOF +network={ + ssid="$NETWORK" + scan_ssid=$SCANSSID + psk="$PASS" + priority=5 +} +EOF elif echo "$ENCRYPTION" | grep -q EAP; then USERPASS=$( $DIALOG \ --title "WPA-Enterprise Setup" \ @@ -301,18 +301,18 @@ elif echo "$ENCRYPTION" | grep -q EAP; then 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - key_mgmt=WPA-EAP$( - echo "$USERPASS" | awk ' - NR == 1 { printf "\n\t\tidentity=\"%s\"", $1 } - NR == 2 { printf "\n\t\tpassword=\"%s\"", $1 } - ' ) - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<EOF +network={ + ssid="$NETWORK" + scan_ssid=$SCANSSID + key_mgmt=WPA-EAP$( + echo "$USERPASS" | awk ' + NR == 1 { printf "\n\t\tidentity=\"%s\"", $1 } + NR == 2 { printf "\n\t\tpassword=\"%s\"", $1 } + ' ) + priority=5 +} +EOF elif echo "$ENCRYPTION" | grep -q WEP; then WEPKEY=$( $DIALOG \ --title "WEP Setup" \ @@ -325,26 +325,26 @@ elif echo "$ENCRYPTION" | grep -q WEP; then 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || exec "$0" "$@" awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - key_mgmt=NONE - wep_key0="$WEPKEY" - wep_tx_keyidx=0 - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<EOF +network={ + ssid="$NETWORK" + scan_ssid=$SCANSSID + key_mgmt=NONE + wep_key0="$WEPKEY" + wep_tx_keyidx=0 + priority=5 +} +EOF else # Open awk 'sub(/^\t/,"")||1' \ - >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<-EOF - network={ - ssid="$NETWORK" - scan_ssid=$SCANSSID - key_mgmt=NONE - priority=5 - } - EOF + >> "$BSDINSTALL_TMPETC/wpa_supplicant.conf" <<EOF +network={ + ssid="$NETWORK" + scan_ssid=$SCANSSID + key_mgmt=NONE + priority=5 +} +EOF fi # Connect to any open networks policy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712070357.vB73vC3F087284>