diff options
-rw-r--r-- | gnu/services/shepherd.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index e2ec59f5aa..19a052c89b 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -97,7 +97,11 @@ #~(begin ;; Keep track of the booted system. (false-if-exception (delete-file "/run/booted-system")) - (symlink (readlink "/run/current-system") + + ;; Make /run/booted-system, an indirect GC root, point to the store item + ;; /run/current-system points to. Use 'canonicalize-path' rather than + ;; 'readlink' to make sure we get the store item. + (symlink (canonicalize-path "/run/current-system") "/run/booted-system") ;; Close any remaining open file descriptors to be on the safe |