Put chroot provision into its own preflight

This commit is contained in:
David Heinemeier Hansson
2025-08-19 21:19:23 +02:00
parent 65636b0ba8
commit 76082b945d
2 changed files with 13 additions and 13 deletions

View File

@@ -0,0 +1,12 @@
# Chroot installations have some differences
if ! cmp -s /proc/1/root/ / 2>/dev/null; then
export OMARCHY_CHROOT_INSTALL=1
fi
chrootable_systemctl_enable() {
if [ -n "${OMARCHY_CHROOT_INSTALL:-}" ]; then
sudo systemctl enable $1
else
sudo systemctl enable --now $1
fi
}