From 26c2c9fa490d741cd5b46feef219a9930bbeb61c Mon Sep 17 00:00:00 2001 From: joshsiv-mulga Date: Thu, 14 May 2026 15:00:56 +1000 Subject: [PATCH] fix(setup): replace /dev/stdin in tmpfiles.d write to work without /dev mount in chroot --- scripts/setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index f61a82646..a0e9af0bf 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -380,11 +380,14 @@ create_directories() { # /run is tmpfs — direct mkdir doesn't survive reboot, and units have # ReadWritePaths= on these paths which fails namespace setup with ENOENT # if the dirs are absent at service start. - $SUDO install -m 0644 /dev/stdin /etc/tmpfiles.d/spinifex.conf <<'TMPEOF' + _tmpf=$(mktemp) + cat > "$_tmpf" <<'TMPEOF' # Type Path Mode User Group Age d /run/spinifex 0770 root spinifex - d /run/spinifex/nbd 0770 spinifex-viperblock spinifex-viperblock - TMPEOF + $SUDO install -m 0644 "$_tmpf" /etc/tmpfiles.d/spinifex.conf + rm -f "$_tmpf" if [ "${ISO_BUILD:-0}" != "1" ]; then # Live systems: materialise the runtime dirs immediately so a re-run of # setup.sh on an existing host has correct /run state without a reboot.