* Create /nix/var/nix/gcroots/tmp in the activation script. The

build hook uses this directory to store temporary GC roots.  (It
  creates it if it doesn't exist, but it's better to do it here as
  well to ensure the right ownership and permissions.)
* Clear /nix/var/nix/gcroots/tmp and /nix/var/nix/temproots at boot
  time.

svn path=/nixos/trunk/; revision=23417
This commit is contained in:
Eelco Dolstra 2010-08-25 11:59:04 +00:00
parent 63c3d72aa6
commit f067d179ab
2 changed files with 5 additions and 0 deletions

View File

@ -133,6 +133,7 @@ let
/nix/var/nix/chroots
mkdir -m 1777 -p /nix/var/nix/gcroots/per-user
mkdir -m 1777 -p /nix/var/nix/profiles/per-user
mkdir -m 1777 -p /nix/var/nix/gcroots/tmp
ln -sf /nix/var/nix/profiles /nix/var/nix/gcroots/
ln -sf /nix/var/nix/manifests /nix/var/nix/gcroots/

View File

@ -130,6 +130,10 @@ mkdir -m 1777 /tmp/.ICE-unix
rm -rf /nix/var/nix/chroots # recreated in activate-configuration.sh
# Also get rid of temporary GC roots.
rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots
# Use a tmpfs for /var/run to ensure that / or /var can be unmounted
# or at least remounted read-only during shutdown. (Upstart 0.6
# apparently uses nscd to do some name lookups, resulting in it