Patchwork wpa-supplicant: Include wpa_supplicant.service file in package for dbus to work

login
register
mail settings
Submitter Stan Hu
Date Jan. 9, 2013, 2:37 a.m.
Message ID <1357699023-8463-1-git-send-email-stanhu@gmail.com>
Download mbox | patch
Permalink /patch/42351/
State New
Headers show

Comments

Stan Hu - Jan. 9, 2013, 2:37 a.m.
The dbus service files include a reference to wpa_supplicant.service, but if it
does not exist the dbus-daemon warns:

[system] Activating via systemd: service name='fi.w1.wpa_supplicant1' unit='wpa_supplicant.service'
[system] Activation via systemd failed for unit 'wpa_supplicant.service': Unit wpa_supplicant.service failed to load: No such file or directory.  See system logs and 'systemctl status wpa_supplicant.service' for details.

If this happens, wpa_supplicant is not run automatically.

Signed-off-by: Stan Hu <stanhu@gmail.com>
---
 .../wpa-supplicant/wpa-supplicant-1.0.inc          |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-1.0.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-1.0.inc
index ff5cddc..0645193 100644
--- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-1.0.inc
+++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-1.0.inc
@@ -21,7 +21,7 @@  S = "${WORKDIR}/wpa_supplicant-${PV}/wpa_supplicant"
 PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
 FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
 FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
-FILES_${PN} += "${datadir}/dbus-1/system-services/*"
+FILES_${PN} += "${datadir}/dbus-1/system-services/* ${systemd_unitdir}/system/*"
 CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
 
 do_configure () {
@@ -63,6 +63,9 @@  do_install () {
 	install -d ${D}/${datadir}/dbus-1/system-services
 	install -m 644 ${S}/dbus/*.service ${D}/${datadir}/dbus-1/system-services
 
+	install -d ${D}/${systemd_unitdir}/system
+	install -m 644 ${S}/systemd/wpa_supplicant.service ${D}/${systemd_unitdir}/system
+
 	install -d ${D}/etc/default/volatiles
 	install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
 }