aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-02 17:57:33 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2023-05-09 08:13:10 +0900
commit57bf13e421a22a7476be89529076c8c6bc508c61 (patch)
tree75a5884dc9b575b5bb8831922202a39c9b65cb79 /meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend
parent790885bdf8b9c6a6134628a99802789f717dee3a (diff)
Divide lxc autostart from main package
Existing lxc package is including autostart feature. In this case, that can't enable/disable using package install. This patch achieve autostare feature enable/disable by package install. Bug-AGL: SPEC-4777 Change-Id: I0373b294b677a39a670b79e3149a6d8a1d5b4432 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Diffstat (limited to 'meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend')
-rw-r--r--meta-agl-ic-container/recipes-container/lxc/lxc_%.bbappend25
1 files changed, 21 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.