[oe-commits] [meta-openembedded] 45/67: usb-modeswitch: add usb-modeswitch at .service
git at git.openembedded.org
git at git.openembedded.org
Sun Nov 19 21:23:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
armin_kuster pushed a commit to branch master-next
in repository meta-openembedded.
commit 19488eb743b7f323a8e7fc8c61b466d285bcbbb8
Author: Martin Kelly <mkelly at xevo.com>
AuthorDate: Tue Nov 7 17:59:56 2017 -0800
usb-modeswitch: add usb-modeswitch at .service
This service is essential for making hotplugging work correctly on a
systemd system. Without it, USB devices get recognized by systemd
instead of the usb-modeswitch udev rule, so hotplugging breaks. Once the
service is added, hotplugging works properly again.
Signed-off-by: Martin Kelly <mkelly at xevo.com>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb
index ff439f3..ac0df8b 100644
--- a/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb
+++ b/meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb
@@ -8,7 +8,9 @@ SRC_URI = "http://www.draisberghof.de/usb_modeswitch/${BP}.tar.bz2"
SRC_URI[md5sum] = "38ad5c9d70e06227a00361bdc2b1e568"
SRC_URI[sha256sum] = "31c0be280d49a99ec3dc0be3325bef320d9c04b50714ef0ce1e36a614d687633"
-inherit pkgconfig
+inherit pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "usb_modeswitch at .service"
EXTRA_OEMAKE = "TCL=${bindir}/tclsh"
@@ -18,4 +20,8 @@ RRECOMMENDS_${PN} = "usb-modeswitch-data"
do_install() {
oe_runmake DESTDIR=${D} install
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}/${systemd_unitdir}/system
+ install -m 644 ${S}/usb_modeswitch at .service ${D}/${systemd_unitdir}/system
+ fi
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list