mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
Noting the booted-system as a gcroot
svn path=/nixos/trunk/; revision=22228
This commit is contained in:
parent
b25771532a
commit
b1b73f3c08
1 changed files with 7 additions and 1 deletions
|
@ -121,9 +121,15 @@ echo "running activation script..."
|
|||
@activateConfiguration@ "$systemConfig"
|
||||
|
||||
|
||||
# Record the boot configuration. !!! Should this be a GC root?
|
||||
# Record the boot configuration.
|
||||
if test -n "$systemConfig"; then
|
||||
ln -sfn "$systemConfig" /var/run/booted-system
|
||||
|
||||
# Prevent the booted system form being garbage-collected
|
||||
# If it weren't a gcroot, if we were running a different kernel,
|
||||
# switched system, and garbage collected all, we could not load
|
||||
# kernel modules anymore.
|
||||
ln -sfn /var/run/booted-system /nix/var/nix/gcroots/booted-system
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue