mirror of
https://github.com/cimryan/teslausb.git
synced 2026-03-01 04:30:33 +00:00
Eliminate BOM from wpa_supplicant.conf
This commit is contained in:
@@ -44,14 +44,18 @@ if ([System.IO.File]::Exists("$wpaSupplicantConfPath")) {
|
|||||||
del "$wpaSupplicantConfPath"
|
del "$wpaSupplicantConfPath"
|
||||||
}
|
}
|
||||||
|
|
||||||
"ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev`
|
$wpaSupplicantConfContent=@"
|
||||||
update_config=1`
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||||
`
|
update_config=1
|
||||||
network={`
|
|
||||||
ssid=`"$wifiSSID`"`
|
network={
|
||||||
psk=`"$wifiPSK`"`
|
ssid="$wifiSSID"
|
||||||
key_mgmt=WPA-PSK`
|
psk="$wifiPSK"
|
||||||
}`
|
}
|
||||||
" | Out-File -FilePath "$wpaSupplicantConfPath" -Encoding utf8
|
"@
|
||||||
|
|
||||||
|
$utf8 = New-Object System.Text.UTF8Encoding $false
|
||||||
|
|
||||||
|
Set-Content -Value $utf8.GetBytes($wpaSupplicantConfContent) -Encoding Byte -Path "$wpaSupplicantConfPath"
|
||||||
|
|
||||||
Write-Verbose "All done."
|
Write-Verbose "All done."
|
||||||
Reference in New Issue
Block a user