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 Apr 9, 2024
1 parent 0a7f893 commit fa9733c
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 fa9733c

Please sign in to comment.