Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape dots in SSID name in order to be NetPlan config ready #157

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/armbian-configng/config.ng.network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ function network_config() {
wifimode=$(whiptail --title "Select wifi mode" --menu "" $((${LIST_LENGTH} + 8)) 60 $((${LIST_LENGTH})) "${LIST[@]}" 3>&1 1>&2 2>&3)
if [[ "${wifimode}" == "sta" && $? == 0 ]]; then
ip link set ${adapter} up
systemctl stop hostapd 1> /dev/null
systemctl disable hostapd 1> /dev/null
systemctl stop hostapd 2> /dev/null
systemctl disable hostapd 2> /dev/null
LIST=()
LIST=($(iw dev ${adapter} scan 2> /dev/null | grep 'SSID\|^BSS' | cut -d" " -f2 | sed "s/(.*//g" | xargs -n2 -d'\n' | awk '{print $2,$1}'))
sleep 2
Expand All @@ -189,7 +189,7 @@ function network_config() {
if [[ -n $SELECTED_PASSWORD ]]; then
# connect to AP
netplan set --origin-hint ${yamlfile} renderer=${renderer}
netplan set --origin-hint ${yamlfile} wifis.$adapter.access-points."${SELECTED_SSID}".password=${SELECTED_PASSWORD}
netplan set --origin-hint ${yamlfile} wifis.$adapter.access-points."${SELECTED_SSID//./\\.}".password=${SELECTED_PASSWORD}
netplan set --origin-hint ${yamlfile} wifis.$adapter.dhcp4=true
netplan set --origin-hint ${yamlfile} wifis.$adapter.dhcp6=true
show_message <<< "$(netplan get all)"
Expand Down