From 179484f739c19ef997888302ecf335c10c197b57 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 27 Mar 2024 17:54:08 +0100 Subject: [PATCH] build_library: Add mangle script for incus sysext This requests the `incus.service` for the multi-user.target Signed-off-by: Mathieu Tortuyaux --- build_library/sysext_mangle_flatcar-incus | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 build_library/sysext_mangle_flatcar-incus diff --git a/build_library/sysext_mangle_flatcar-incus b/build_library/sysext_mangle_flatcar-incus new file mode 100755 index 00000000000..650e5e07b1f --- /dev/null +++ b/build_library/sysext_mangle_flatcar-incus @@ -0,0 +1,20 @@ +#!/bin/bash + +set -euo pipefail +rootfs="${1}" + +pushd "${rootfs}" + +pushd ./usr/lib/systemd/system +mkdir -p "multi-user.target.d" +{ echo "[Unit]"; echo "Upholds=incus.service"; } > "multi-user.target.d/10-incus.conf" +popd + +mkdir -p ./usr/lib/tmpfiles.d +pushd ./usr/lib/tmpfiles.d +cat <./10-incus.conf +d /var/lib/lxc/rootfs 0755 root root - - +EOF +popd + +popd