[meta-virtualization] [PATCH] lxc: install lxc.service if DISTRO_FEATURES contains systemd
Bruce Ashfield
bruce.ashfield at gmail.com
Tue Jun 9 06:02:12 PDT 2015
On Tue, Jun 9, 2015 at 1:14 AM, Erik Botö <erik.boto at pelagicore.com> wrote:
> Signed-off-by: Erik Botö <erik.boto at pelagicore.com>
> ---
> recipes-containers/lxc/lxc_1.0.7.bb | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/recipes-containers/lxc/lxc_1.0.7.bb b/recipes-containers/lxc/lxc_1.0.7.bb
> index f79ba76..948dd0f 100644
> --- a/recipes-containers/lxc/lxc_1.0.7.bb
> +++ b/recipes-containers/lxc/lxc_1.0.7.bb
> @@ -94,6 +94,11 @@ do_install_append() {
> for i in `grep -l "#! */bin/bash" ${D}${datadir}/lxc/hooks/*`; do \
> sed -e 's|#! */bin/bash|#!/bin/sh|' -i $i; done
>
> + if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
> + install -d ${D}${systemd_unitdir}/system/
> + cp ${S}/config/init/systemd/lxc.service ${D}${systemd_unitdir}/system/
> + fi
We actually don't need this, I introduced a similar copy in January of
this year, and subsequently
removed it, since the line:
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit',
'--with-init-script=sysvinit', '--with-init-script=systemd', d)}"
Takes care of the proper generation and install of the service files
(and sysvinit scripts).
If we are having issues with startup, we need to see what broke since
I made the change
and tested it.
Also note that SYSTEMD_AUTO_ENABLE_${PN}-setup is currently set to "disable", so
you do need to enable the systemd init parts as well.
Bruce
> +
> if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
> install -d ${D}${sysconfdir}/init.d
> cp ${S}/config/init/sysvinit/lxc ${D}${sysconfdir}/init.d
> --
> 1.9.1
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
More information about the meta-virtualization
mailing list