]> git.plutz.net Git - blast/commitdiff
modified receipe layout
authorPaul Hänsch <paul@plutz.net>
Tue, 14 Apr 2026 04:07:55 +0000 (06:07 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 14 Apr 2026 04:07:55 +0000 (06:07 +0200)
modules/wifi.mk [new file with mode: 0644]

diff --git a/modules/wifi.mk b/modules/wifi.mk
new file mode 100644 (file)
index 0000000..efcb6fe
--- /dev/null
@@ -0,0 +1,26 @@
+define WIFICFG :=
+auto wlan0
+allow-hotplug wlan0
+
+iface wlan0 inet dhcp
+
+endef
+
+ifdef wifi
+  ifdef wifipass
+    define WIFICFG +=
+      wpa-ssid "${wifi}"
+      wpa-psk  "${wifipass}"
+    endef
+  else
+    define WIFICFG +=
+      wireless-ssid    "${wifi}"
+    endef
+  endif
+
+  _config: ${CFGROOT}/etc/network/interfaces.d/wifi
+endif
+
+export WIFICFG
+${CFGROOT}/etc/network/interfaces.d/wifi: _copy
+       printf '%s\n' "$${WIFICFG}" >"$@"