From 8e46e6288834c6a50e671cc8e15aa1825e8b5a7d Mon Sep 17 00:00:00 2001 From: rern Date: Mon, 2 Jan 2023 13:35:07 +0700 Subject: [PATCH] u --- srv/http/bash/settings/networks-data.sh | 2 +- srv/http/bash/startup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/srv/http/bash/settings/networks-data.sh b/srv/http/bash/settings/networks-data.sh index a8edd49d0..32e84563a 100644 --- a/srv/http/bash/settings/networks-data.sh +++ b/srv/http/bash/settings/networks-data.sh @@ -23,7 +23,7 @@ listWlan() { readarray -t profiles <<< $( ls -1p /etc/netctl | grep -v /$ ) if [[ $profiles ]]; then for profile in "${profiles[@]}"; do - ! grep -q Interface=$wldev "/etc/netctl/$profile" && continue + ! grep -q 'Interface="*'$wldev "/etc/netctl/$profile" && continue if netctl is-active "$profile" &> /dev/null; then for i in {1..10}; do ipwl=$( ifconfig $wldev | awk '/inet.*broadcast/ {print $2}' ) diff --git a/srv/http/bash/startup.sh b/srv/http/bash/startup.sh index f9adfbe08..40cf5e796 100644 --- a/srv/http/bash/startup.sh +++ b/srv/http/bash/startup.sh @@ -35,7 +35,7 @@ if [[ -e /boot/wifi && $wlandev ]]; then key=$( sed -E -n '/^Key/ {s/^.*="*|"$//g; p}' <<< $wifi ) filebootwifi="/etc/netctl/$ssid" cat << EOF > "$filebootwifi" -Interface="$wlandev" +Interface=$wlandev $( grep -E -v '^#|^\s*$|^Interface|^ESSID|^Key' <<< $wifi ) ESSID="$( sed 's/"/\\"/g' <<< $ssid )" Key="$( sed 's/"/\\"/g' <<< $key )"