diff options
| author | Roy Li <rongqing.li@windriver.com> | 2015-09-14 16:31:15 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-09-23 15:37:19 +0200 |
| commit | 00e3b4f6767a8e5d5b061af2d8447ee68b47c9d3 (patch) | |
| tree | 193d92506fa4a48bf86029b3a14195188848d57e | |
| parent | 75679d4422f8080550cd96e8e8f097ee98784853 (diff) | |
| download | meta-openembedded-00e3b4f6767a8e5d5b061af2d8447ee68b47c9d3.tar.gz | |
lvm2: install initscript or systemd unit service conditionally
Issue: LIN8-854
install systemd unit files and modify them only when DISTRO_FEATURE
systemd is enabled, otherwise do_install failed due to no
blk-availability.service file
sed: can't read tmp/work/armv5e-wrs-linux-gnueabi/lvm2/2.02.125-r0/image/lib/systemd/system/blk-availability.service: No such file or directory
install the initscript when init is not systemd
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/lvm2/lvm2.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc index 2b2d8ed337..cc70246cff 100644 --- a/meta-oe/recipes-support/lvm2/lvm2.inc +++ b/meta-oe/recipes-support/lvm2/lvm2.inc | |||
| @@ -39,8 +39,14 @@ do_install_append() { | |||
| 39 | # Install machine specific configuration file | 39 | # Install machine specific configuration file |
| 40 | install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf | 40 | install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf |
| 41 | sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf | 41 | sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf |
| 42 | oe_runmake 'DESTDIR=${D}' install install_systemd_units | 42 | if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 43 | sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_unitdir}/system/blk-availability.service | 43 | oe_runmake 'DESTDIR=${D}' install install_systemd_units |
| 44 | sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_unitdir}/system/blk-availability.service | ||
| 45 | else | ||
| 46 | oe_runmake 'DESTDIR=${D}' install install_initscripts | ||
| 47 | mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d | ||
| 48 | rm -rf ${D}${sysconfdir}/rc.d | ||
| 49 | fi | ||
| 44 | } | 50 | } |
| 45 | 51 | ||
| 46 | SYSTEMD_PACKAGES = "${PN}" | 52 | SYSTEMD_PACKAGES = "${PN}" |
