summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/lxc/lxc_1.0.7.bb25
1 files changed, 23 insertions, 2 deletions
diff --git a/recipes-containers/lxc/lxc_1.0.7.bb b/recipes-containers/lxc/lxc_1.0.7.bb
index 952c9262..b1f47391 100644
--- a/recipes-containers/lxc/lxc_1.0.7.bb
+++ b/recipes-containers/lxc/lxc_1.0.7.bb
@@ -47,16 +47,28 @@ PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparm
47PACKAGECONFIG[templates] = ",,, ${PN}-templates" 47PACKAGECONFIG[templates] = ",,, ${PN}-templates"
48PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" 48PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
49 49
50inherit autotools pkgconfig ptest 50inherit autotools pkgconfig ptest update-rc.d systemd
51
52SYSTEMD_PACKAGES = "${PN}-setup"
53SYSTEMD_SERVICE_${PN}-setup = "lxc.service"
54SYSTEMD_AUTO_ENABLE_${PN}-setup = "enable"
55
56INITSCRIPT_PACKAGES = "${PN}-setup"
57INITSCRIPT_NAME_{PN}-setup = "lxc"
58INITSCRIPT_PARAMS_${PN}-setup = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
51 59
52FILES_${PN}-doc = "${mandir} ${infodir}" 60FILES_${PN}-doc = "${mandir} ${infodir}"
53# For LXC the docdir only contains example configuration files and should be included in the lxc package 61# For LXC the docdir only contains example configuration files and should be included in the lxc package
54FILES_${PN} += "${docdir}" 62FILES_${PN} += "${docdir}"
55FILES_${PN}-dbg += "${libexecdir}/lxc/.debug" 63FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
56PACKAGES =+ "${PN}-templates" 64PACKAGES =+ "${PN}-templates ${PN}-setup"
57FILES_${PN}-templates += "${datadir}/lxc/templates" 65FILES_${PN}-templates += "${datadir}/lxc/templates"
58RDEPENDS_${PN}-templates += "bash" 66RDEPENDS_${PN}-templates += "bash"
59 67
68FILES_${PN}-setup += "/etc/tmpfiles.d"
69FILES_${PN}-setup += "/lib/systemd/system"
70FILES_${PN}-setup += "/etc/init.d"
71
60PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1" 72PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
61 73
62do_install_append() { 74do_install_append() {
@@ -69,6 +81,15 @@ do_install_append() {
69 81
70 for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \ 82 for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \
71 sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done 83 sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done
84
85 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
86 install -d ${D}${sysconfdir}/init.d
87 cp ${S}/config/init/sysvinit/lxc ${D}${sysconfdir}/init.d
88 else
89 install -d ${D}${systemd_unitdir}/system
90 install -m 755 ${S}/config/init/systemd/lxc.service ${D}${systemd_unitdir}/system/lxc.service
91 install -m 755 ${S}/config/init/systemd/lxc-devsetup ${D}${libexecdir}/lxc/
92 fi
72} 93}
73 94
74EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests" 95EXTRA_OEMAKE += "TEST_DIR=${D}${PTEST_PATH}/src/tests"