From 80a09041961a50e9dd63d8a4604d60b0c44cf66e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 20 Mar 2007 11:45:59 +0000 Subject: [PATCH] * Set /var/run/current-system to the currently active system configuration, and use it as a garbage collection root to prevent the current configuration from being GC'ed (which was previously possible if the configuration was activated using "nixos-rebuild test", or if the configuration's generation symlink had been removed from the system profile). This isn't quite right yet due to a layering problem: activate-configuration.sh doesn't know the top-level store path of the configuration. svn path=/nixos/trunk/; revision=8379 --- system/activate-configuration.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system/activate-configuration.sh b/system/activate-configuration.sh index 2a39e5649a5..766d75fa167 100644 --- a/system/activate-configuration.sh +++ b/system/activate-configuration.sh @@ -135,3 +135,10 @@ done # Set the host name. hostname @hostName@ + + +# Make this configuration the current configuration. +ln -sfn @out@ /var/run/current-system + +# Prevent the current configuration from being garbage-collected. +ln -sfn /var/run/current-system /nix/var/nix/gcroots/current-system