summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2017-11-07 17:59:56 -0800
committerArmin Kuster <akuster808@gmail.com>2017-11-19 13:45:38 -0800
commit34aa4c3202b427f59f843dc43a4e1afda4f81d13 (patch)
tree04dff763cd245782367b4d245b382f780bbccd32
parent19f0e8b40b88162483198934ac38c04d60102791 (diff)
downloadmeta-openembedded-34aa4c3202b427f59f843dc43a4e1afda4f81d13.tar.gz
usb-modeswitch: add usb-modeswitch@.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@xevo.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/usb-modeswitch/usb-modeswitch_2.5.0.bb8
1 files changed, 7 insertions, 1 deletions
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 ff439f321c..ac0df8bab4 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"
8SRC_URI[md5sum] = "38ad5c9d70e06227a00361bdc2b1e568" 8SRC_URI[md5sum] = "38ad5c9d70e06227a00361bdc2b1e568"
9SRC_URI[sha256sum] = "31c0be280d49a99ec3dc0be3325bef320d9c04b50714ef0ce1e36a614d687633" 9SRC_URI[sha256sum] = "31c0be280d49a99ec3dc0be3325bef320d9c04b50714ef0ce1e36a614d687633"
10 10
11inherit pkgconfig 11inherit pkgconfig systemd
12
13SYSTEMD_SERVICE_${PN} = "usb_modeswitch@.service"
12 14
13EXTRA_OEMAKE = "TCL=${bindir}/tclsh" 15EXTRA_OEMAKE = "TCL=${bindir}/tclsh"
14 16
@@ -18,4 +20,8 @@ RRECOMMENDS_${PN} = "usb-modeswitch-data"
18 20
19do_install() { 21do_install() {
20 oe_runmake DESTDIR=${D} install 22 oe_runmake DESTDIR=${D} install
23 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
24 install -d ${D}/${systemd_unitdir}/system
25 install -m 644 ${S}/usb_modeswitch@.service ${D}/${systemd_unitdir}/system
26 fi
21} 27}