improve wpa_supplicant startup

only start if interfaces are accordingly set
This commit is contained in:
macmpi 2022-12-05 09:57:08 +01:00
parent 295d3bbeb5
commit 27458299c9
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -12,7 +12,6 @@ if [ -f "${ovlpath}/wpa_supplicant.conf" ]; then
logger -st ${0##*/} "Wifi setup found !"
apk add wpa_supplicant
cp "${ovlpath}/wpa_supplicant.conf" /etc/wpa_supplicant/wpa_supplicant.conf
rc-service wpa_supplicant start
else
logger -st ${0##*/} "Wifi setup not found !"
fi
@ -68,6 +67,8 @@ cat /etc/network/interfaces
echo "alpine-headless" > /etc/hostname
hostname -F /etc/hostname
grep -q "wlan" /etc/network/interfaces && [ -f /etc/wpa_supplicant/wpa_supplicant.conf ] && rc-service wpa_supplicant start
rc-service networking start