Skip to content

Commit

Permalink
build_library: Add mangle script for incus sysext
Browse files Browse the repository at this point in the history
This requests the `incus.service` for the multi-user.target

Signed-off-by: Mathieu Tortuyaux <[email protected]>
  • Loading branch information
tormath1 committed Mar 28, 2024
1 parent 2d49efa commit ad084e8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build_library/sysext_mangle_flatcar-incus
Original file line number Diff line number Diff line change
@@ -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 <<EOF >./10-incus.conf
d /var/lib/lxc/rootfs 0755 root root - -
EOF
popd

popd

0 comments on commit ad084e8

Please sign in to comment.