summaryrefslogtreecommitdiffstats
path: root/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
blob: 7ee8b6cf59ae476eff108cbbcd73e304a8a9f618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += " \
    file://0001-Remove-container-automatic-rebooting.patch \
    file://lxc.service \
    file://lxc-net.service \
    "

PACKAGECONFIG:remove = "templates"

do_install:append () {
    for service in lxc.service lxc-net.service; do
        install -D -m 0644 ${WORKDIR}/$service ${D}${systemd_system_unitdir}/$service
        sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_system_unitdir}/$service
    done
}

# Divide lxc autostart from main package.
SYSTEMD_PACKAGES = "${PN}-autostart ${PN}-monitord ${PN}-networking"
SYSTEMD_SERVICE:${PN} = ""
SYSTEMD_SERVICE:${PN}-autostart = "lxc.service"
SYSTEMD_AUTO_ENABLE:${PN}-autostart = "enable"
SYSTEMD_SERVICE:${PN}-monitord = "lxc-monitord.service"
SYSTEMD_AUTO_ENABLE:${PN}-monitord = "enable"

PACKAGES =+ "${PN}-autostart ${PN}-monitord"

FILES:${PN}-autostart += " \
    ${sysconfdir}/default/lxc \
    ${sysconfdir}/default/volatiles/99_lxc \
"
FILES:${PN}-doc += " \
    ${datadir}/doc/lxc/examples \
"
FILES:${PN}-monitord += " \
    ${libexexdir}/lxc/lxc-monitord \
"
FILES:${PN}-networking += " \
    ${sysconfdir}/dnsmasq.d \
"

# NOTE:
# This needs to be replaced with a rework of the upstream packaging
# to do a proper split of core from the template support.
RDEPENDS:${PN} = ""