aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend25
-rw-r--r--meta-agl-ic-container/recipes-platform/images/agl-cluster-demo-lxc-host.bb1
2 files changed, 22 insertions, 4 deletions
diff --git a/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend b/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
index 75ab98c0..1b78edfa 100644
--- a/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
+++ b/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
@@ -1,7 +1,3 @@
-PACKAGECONFIG:remove = "templates"
-
-SYSTEMD_AUTO_ENABLE:${PN} = "enable"
-
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += " \
@@ -9,6 +5,8 @@ SRC_URI += " \
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
@@ -16,6 +14,25 @@ do_install:append () {
done
}
+# Divide lxc autostart from main package.
+SYSTEMD_PACKAGES = "${PN}-autostart ${PN}-networking"
+SYSTEMD_SERVICE:${PN} = ""
+SYSTEMD_SERVICE:${PN}-autostart = "lxc.service"
+SYSTEMD_AUTO_ENABLE:${PN}-autostart = "enable"
+
+PACKAGES =+ "${PN}-autostart"
+
+FILES:${PN}-autostart += " \
+ ${sysconfdir}/default/lxc \
+ ${sysconfdir}/default/volatiles/99_lxc \
+"
+FILES:${PN}-doc += " \
+ ${datadir}/doc/lxc/examples \
+"
+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.
diff --git a/meta-agl-ic-container/recipes-platform/images/agl-cluster-demo-lxc-host.bb b/meta-agl-ic-container/recipes-platform/images/agl-cluster-demo-lxc-host.bb
index c7424f57..d26e6a63 100644
--- a/meta-agl-ic-container/recipes-platform/images/agl-cluster-demo-lxc-host.bb
+++ b/meta-agl-ic-container/recipes-platform/images/agl-cluster-demo-lxc-host.bb
@@ -17,6 +17,7 @@ IMAGE_INSTALL += " \
# packages required for network bridge settings via lxc-net
IMAGE_INSTALL += " \
+ lxc-autostart \
lxc-networking \
iptables-modules \
dnsmasq \