mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
NM ssid detection
This commit is contained in:
parent
671343b9e9
commit
d831f05769
1 changed files with 8 additions and 2 deletions
|
@ -22,10 +22,10 @@ if [ -f /etc/wpa_supplicant/wpa_supplicant.conf ]; then
|
||||||
SSID=`grep ssid /etc/wpa_supplicant/wpa_supplicant.conf | awk -F = '{print $2}' | sed -r s/\"// | sed -r s/\"//`
|
SSID=`grep ssid /etc/wpa_supplicant/wpa_supplicant.conf | awk -F = '{print $2}' | sed -r s/\"// | sed -r s/\"//`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# covers netplan's bugs workaround
|
|
||||||
# https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1862760
|
# https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1862760
|
||||||
# https://bugs.launchpad.net/netplan/+bug/1951586
|
# https://bugs.launchpad.net/netplan/+bug/1951586
|
||||||
# WiFi country code progress on arm64 OS's discussed on #3078
|
# WiFi country code progress on arm64 OS's discussed on #3078
|
||||||
|
# covers netplan systemd use on server with bug workarounds
|
||||||
if [ -f /run/netplan/wpa-$IFACE.conf ]; then
|
if [ -f /run/netplan/wpa-$IFACE.conf ]; then
|
||||||
NETPLAN=1
|
NETPLAN=1
|
||||||
SSID=`grep ssid /run/netplan/wpa-$IFACE.conf | awk -F = '{print $2}' | sed -r s/\"// | sed -r s/\"//`
|
SSID=`grep ssid /run/netplan/wpa-$IFACE.conf | awk -F = '{print $2}' | sed -r s/\"// | sed -r s/\"//`
|
||||||
|
@ -50,8 +50,14 @@ if [ -f /etc/iiab/iiab.env ]; then
|
||||||
SSID=$CLIENT_SSID
|
SSID=$CLIENT_SSID
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# NetworkManager
|
||||||
|
if [[ $SSID == "NA" ]]; then
|
||||||
|
SSID=$(iw $IFACE info | grep ssid | awk '{print $2}' )
|
||||||
|
fi
|
||||||
echo "ssid is $SSID"
|
echo "ssid is $SSID"
|
||||||
if [[ $SSID == "" ]] || [[ $SSID == "NA" ]]; then
|
|
||||||
|
if [[ $SSID == "" ]]; then
|
||||||
echo "Couldn't find ssid $SSID to use exiting"
|
echo "Couldn't find ssid $SSID to use exiting"
|
||||||
if [ $NETPLAN -eq 1 ]; then
|
if [ $NETPLAN -eq 1 ]; then
|
||||||
echo "Netplan1"
|
echo "Netplan1"
|
||||||
|
|
Loading…
Reference in a new issue