2019-12-29 14:03:51 +01:00
|
|
|
From 09ea96ba56e3437b16e6d7d48679f48019c1d17b Mon Sep 17 00:00:00 2001
|
2019-12-20 21:05:12 +01:00
|
|
|
From: Peter Steenbergen <info@j1nx.nl>
|
2019-12-29 14:03:51 +01:00
|
|
|
Date: Fri, 27 Dec 2019 20:53:47 +0100
|
2019-12-20 21:05:12 +01:00
|
|
|
Subject: [PATCH 1/1] Enable systemd wifi wlan0 by default.
|
|
|
|
|
|
|
|
---
|
2019-12-29 14:03:51 +01:00
|
|
|
package/wpa_supplicant/wpa_supplicant.mk | 5 ++++-
|
|
|
|
package/wpa_supplicant/wpa_supplicant@.service | 18 ++++++++++++++++++
|
|
|
|
2 files changed, 22 insertions(+), 1 deletion(-)
|
|
|
|
create mode 100644 package/wpa_supplicant/wpa_supplicant@.service
|
2019-12-20 21:05:12 +01:00
|
|
|
|
|
|
|
diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk
|
2019-12-29 14:03:51 +01:00
|
|
|
index a518ecc217..de7301cee5 100644
|
2019-12-20 21:05:12 +01:00
|
|
|
--- a/package/wpa_supplicant/wpa_supplicant.mk
|
|
|
|
+++ b/package/wpa_supplicant/wpa_supplicant.mk
|
2019-12-29 14:03:51 +01:00
|
|
|
@@ -230,8 +230,11 @@ endef
|
|
|
|
define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant.service \
|
2019-12-20 21:05:12 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant.service
|
2019-12-29 14:03:51 +01:00
|
|
|
- $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant@.service \
|
|
|
|
+ $(INSTALL) -m 0644 -D package/wpa_supplicant/wpa_supplicant@.service \
|
2019-12-20 21:05:12 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant@.service
|
2019-12-29 14:03:51 +01:00
|
|
|
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-wlan0.device.wants
|
2019-12-20 21:05:12 +01:00
|
|
|
+ ln -fs ../../../../usr/lib/systemd/system/wpa_supplicant@.service \
|
2019-12-29 14:03:51 +01:00
|
|
|
+ $(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-wlan0.device.wants/wpa_supplicant@wlan0.service
|
2019-12-20 21:05:12 +01:00
|
|
|
$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211@.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211@.service
|
|
|
|
$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired@.service \
|
2019-12-29 14:03:51 +01:00
|
|
|
diff --git a/package/wpa_supplicant/wpa_supplicant@.service b/package/wpa_supplicant/wpa_supplicant@.service
|
|
|
|
new file mode 100644
|
|
|
|
index 0000000000..b7d2d2d88d
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/package/wpa_supplicant/wpa_supplicant@.service
|
|
|
|
@@ -0,0 +1,18 @@
|
|
|
|
+[Unit]
|
|
|
|
+Description=WPA supplicant daemon (interface-specific version)
|
|
|
|
+Requires=sys-subsystem-net-devices-%i.device
|
|
|
|
+After=sys-subsystem-net-devices-%i.device
|
|
|
|
+Before=network.target
|
|
|
|
+Wants=network.target
|
|
|
|
+
|
|
|
|
+# check existence of configuration file
|
|
|
|
+ConditionPathExists=/etc/wpa_supplicant/wpa_supplicant-%I.conf
|
|
|
|
+
|
|
|
|
+# NetworkManager users will probably want the dbus version instead.
|
|
|
|
+
|
|
|
|
+[Service]
|
|
|
|
+Type=simple
|
|
|
|
+ExecStart=/usr/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
|
|
|
|
+
|
|
|
|
+[Install]
|
|
|
|
+WantedBy=sys-subsystem-net-devices-%i.device
|
2019-12-20 21:05:12 +01:00
|
|
|
--
|
|
|
|
2.24.0.rc1
|
|
|
|
|