nixos/nixos-enter: Create /tmp

/tmp is normally created by the systemd-tmpfiles-setup systemd service
at startup.

Fixes #39140
This commit is contained in:
Chuck 2020-02-21 17:49:56 -08:00
parent 92055b17c5
commit 48810b2cfa

View File

@ -69,6 +69,9 @@ mount --rbind /sys "$mountPoint/sys"
# Run the activation script. Set $LOCALE_ARCHIVE to supress some Perl locale warnings.
LOCALE_ARCHIVE="$system/sw/lib/locale/locale-archive" chroot "$mountPoint" "$system/activate" 1>&2 || true
# Create /tmp
chroot "$mountPoint" systemd-tmpfiles --create --remove --exclude-prefix=/dev 1>&2 || true
)
exec chroot "$mountPoint" "${command[@]}"