Skip to contentSkip to conversation

wpa_supplicant: install systemd service files

PATCH Superseded Mike Williams 3 participants 6 messages Mar 9, 2015 – Mar 19, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 wpa_supplicant: install systemd service files

---
 package/wpa_supplicant/wpa_supplicant.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)
package/wpa_supplicant/wpa_supplicant.mk +11 -0
index 682cb4c..242bea5 100644
@@ -164,4 +164,15 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
 	$(WPA_SUPPLICANT_INSTALL_DBUS)
 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 at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211 at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211 at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-wired at .service
+endef
+
 $(eval $(generic-package))
Signature · 1 line
2.1.0
#1 lore raw

PATCH v2 1/1 wpa_supplicant: install systemd service files

Dear Mike Williams,

Quoted 8 lines · Mike Williams
package/wpa_supplicant/wpa_supplicant.mk +0 -0
index 682cb4c..242bea5 100644
@@ -164,4 +164,15 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
 	$(WPA_SUPPLICANT_INSTALL_DBUS)
 endef
 

package/wpa_supplicant/wpa_supplicant.mk define WPA_SUPPLICANT_INSTALL_TARGET_CMDS · line 176

Quoted 10 lines
package/wpa_supplicant/wpa_supplicant.mk +10 -0
+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 at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211 at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211 at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-wired at .service
+endef

Could you please add the symlinks needed to make sure that these services are started at boot by default?

I know this is not your opinion, but starting services by default is what we do in basically all packages in Buildroot today, and therefore something we should continue doing for consistency (and also because we believe that's a sane default).

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 wpa_supplicant: install systemd service files

Thomas,

Quoted 12 lines · Thomas Petazzoni

Dear Mike Williams,

Quoted 8 lines · Mike Williams
package/wpa_supplicant/wpa_supplicant.mk +0 -0
index 682cb4c..242bea5 100644
@@ -164,4 +164,15 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
      $(WPA_SUPPLICANT_INSTALL_DBUS)
 endef
 
Quoted 13 lines

package/wpa_supplicant/wpa_supplicant.mk define WPA_SUPPLICANT_INSTALL_TARGET_CMDS · line 176

Quoted 10 lines
package/wpa_supplicant/wpa_supplicant.mk +10 -0
+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 at .service \
+             $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant at .service
+     $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211 at .service \
+             $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211 at .service
+     $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired at .service \
+             $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-wired at .service
+endef

Could you please add the symlinks needed to make sure that these services are started at boot by default?

Yes, but it will take me a little while, maybe next week. Some of these appear to be mutually exclusive, some of them require specific configuration files for the interface or they will fail, and the wpa_supplicant.service file needs to be modified depending on build options set, etc. so it's not as simple as just enabling all of them.

Quoted 13 lines

I know this is not your opinion, but starting services by default is what we do in basically all packages in Buildroot today, and therefore something we should continue doing for consistency (and also because we believe that's a sane default).

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

#3 lore raw

PATCH v2 1/1 wpa_supplicant: install systemd service files

Dear Mike Williams,

Quoted 5 lines · Mike Williams

Yes, but it will take me a little while, maybe next week. Some of these appear to be mutually exclusive, some of them require specific configuration files for the interface or they will fail, and the wpa_supplicant.service file needs to be modified depending on build options set, etc. so it's not as simple as just enabling all of them.

Well, we had some discussion on IRC, and Arnout pointed out that wpa_supplicant may be used for example by connman, and in this case, you don't need to have the wpa_supplicant service started at boot.

So maybe in the end, what you propose is the good solution, and leave it to the user to actually enable the service at boot if needed.

Arnout?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v2 1/1 wpa_supplicant: install systemd service files

Thomas,

Quoted 10 lines · Thomas Petazzoni

Dear Mike Williams,

Quoted 5 lines · Mike Williams

Yes, but it will take me a little while, maybe next week. Some of these appear to be mutually exclusive, some of them require specific configuration files for the interface or they will fail, and the wpa_supplicant.service file needs to be modified depending on build options set, etc. so it's not as simple as just enabling all of them.

Quoted 8 lines

Well, we had some discussion on IRC, and Arnout pointed out that wpa_supplicant may be used for example by connman, and in this case, you don't need to have the wpa_supplicant service started at boot.

So maybe in the end, what you propose is the good solution, and leave it to the user to actually enable the service at boot if needed.

Arnout?

Did you guys ever decide what you want done here?

Thanks,
Mike

#5 lore raw

PATCH v2 1/1 wpa_supplicant: install systemd service files

In reply to Mike Williams
Quoted 1 line · Mike Williams

As discussed on IRC, adding symlinks to actually start those services is not
such a great idea because
- you probably don't want all of them;
- also other things are needed, like hostapd config and ifup wlan0;
- you may have something to manage these services, like network-manager or networkd.

Could be good to add that in a comment though.

Regards,
Arnout

Quoted 25 lines
---
 package/wpa_supplicant/wpa_supplicant.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)
package/wpa_supplicant/wpa_supplicant.mk +11 -0
index 682cb4c..242bea5 100644
@@ -164,4 +164,15 @@ define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
 	$(WPA_SUPPLICANT_INSTALL_DBUS)
 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 at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211 at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211 at .service
+	$(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired at .service \
+		$(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-wired at .service
+endef
+
 $(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F