This commit is contained in:
Zsolt Alföldi
2026-02-26 12:40:44 +01:00
parent 561044e548
commit 7c53335966
6 changed files with 210 additions and 137 deletions

13
scripts/wifi.sh Executable file
View File

@@ -0,0 +1,13 @@
export wifi_iface=$(ls /sys/class/net 2>/dev/null | grep -E "^(wl|wlan|wlp)" | head -1)
if [ -z "$wifi_iface" ]; then
echo "No WiFi interface found skipping configuration."
exit 0
fi
echo "Configuring WiFi on $wifi_iface"
envsubst < /cdrom/nocloud/user-data-wifi.config > /target/etc/netplan/99-wifi.yaml
chmod 600 /target/etc/netplan/99-wifi.yaml
# chroot /target netplan generate