summary refs log tree commit diff
path: root/nixos/modules/installer/tools/nixos-enter.sh
diff options
context:
space:
mode:
authorChuck <chuck@intelligence.org>2020-02-21 17:49:56 -0800
committerChuck <chuck@intelligence.org>2020-02-21 17:52:47 -0800
commit48810b2cfaf39f9278d759ac2a69a84981acb070 (patch)
tree1f8dd5dd7f1b39f1f82c2696d1639bda07ebd3ea /nixos/modules/installer/tools/nixos-enter.sh
parent92055b17c5a47f11b806cc615de0e0b43eb822ef (diff)
downloadnixpkgs-48810b2cfaf39f9278d759ac2a69a84981acb070.tar
nixpkgs-48810b2cfaf39f9278d759ac2a69a84981acb070.tar.gz
nixpkgs-48810b2cfaf39f9278d759ac2a69a84981acb070.tar.bz2
nixpkgs-48810b2cfaf39f9278d759ac2a69a84981acb070.tar.lz
nixpkgs-48810b2cfaf39f9278d759ac2a69a84981acb070.tar.xz
nixpkgs-48810b2cfaf39f9278d759ac2a69a84981acb070.tar.zst
nixpkgs-48810b2cfaf39f9278d759ac2a69a84981acb070.zip
nixos/nixos-enter: Create /tmp
/tmp is normally created by the systemd-tmpfiles-setup systemd service
at startup.

Fixes #39140
Diffstat (limited to 'nixos/modules/installer/tools/nixos-enter.sh')
-rw-r--r--nixos/modules/installer/tools/nixos-enter.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/installer/tools/nixos-enter.sh b/nixos/modules/installer/tools/nixos-enter.sh
index 1fdd4627a90..d3006e9fe17 100644
--- a/nixos/modules/installer/tools/nixos-enter.sh
+++ b/nixos/modules/installer/tools/nixos-enter.sh
@@ -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[@]}"