From 09ea96ba56e3437b16e6d7d48679f48019c1d17b Mon Sep 17 00:00:00 2001 From: Peter Steenbergen Date: Fri, 27 Dec 2019 20:53:47 +0100 Subject: [PATCH 1/1] Enable systemd wifi wlan0 by default. --- 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 diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk index a518ecc217..de7301cee5 100644 --- a/package/wpa_supplicant/wpa_supplicant.mk +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -230,8 +230,11 @@ endef define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant.service \ $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant.service - $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant@.service \ + $(INSTALL) -m 0644 -D package/wpa_supplicant/wpa_supplicant@.service \ $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant@.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-wlan0.device.wants + ln -fs ../../../../usr/lib/systemd/system/wpa_supplicant@.service \ + $(TARGET_DIR)/etc/systemd/system/sys-subsystem-net-devices-wlan0.device.wants/wpa_supplicant@wlan0.service $(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 \ 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 -- 2.24.0.rc1