janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 593ea34cbdd65fe8ccafa0b338b09f3742afb0f7
Author: Jan (janneke) Nieuwenhuizen <[email protected]>
AuthorDate: Thu Apr 30 18:18:49 2020 +0200
gnu: hurd: Switch system in RC.
* gnu/packages/hurd.scm (hurd-rc-script): Switch system.
---
gnu/packages/hurd.scm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index b82d12a..378547a 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -349,7 +349,22 @@ boot, since this cannot be done from GNU/Linux."
(apply invoke "settrans" "-c" node command))))
'#$translators)
- ;; Activate the system
+ ;; Setting current system
+ (unless (file-exists? "/run/current-system/profile")
+ (format #t "Setting current system...\n")
+ (mkdir-p "/run/current-system")
+ (let ((profiles (find-files "/gnu/store"
+ (lambda (name stat)
+ (and (string-suffix? "-profile" name)
+ (eq? 'directory (stat:type
stat))))
+ #:directories? #t)))
+ (when (> (length profiles) 1)
+ (format #t "Too many profiles found...choosing first!\n"))
+ (if (null? profiles)
+ (format #t "No profiles found...Good luck!\n")
+ (symlink (car profiles) "/run/current-system/profile"))))
+ ;; XXX Activate the system
+ (format #t "Activating system...\n")
(invoke "/run/current-system/profile/bin/sh" "/boot/activation")
;; Hand over to the Shepherd
(false-if-exception (delete-file "/var/run/shepherd/socket"))