mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 06:46:50 +01:00
hurd-boot: Support second boot.
* gnu/build/hurd-boot.scm (boot-hurd-system): Check for stale shepherd socket and remove it. Be chattier about /hurd symlink replacement. Change-Id: I5e528c131ebeadb7ebc9727336a0f9301af3e68e
This commit is contained in:
parent
b25d2ad5c7
commit
f2cefd700d
1 changed files with 16 additions and 5 deletions
|
@ -322,18 +322,29 @@ (define* (boot-hurd-system #:key (on-error 'debug))
|
||||||
|
|
||||||
(let* ((args (command-line))
|
(let* ((args (command-line))
|
||||||
(system (find-long-option "gnu.system" args))
|
(system (find-long-option "gnu.system" args))
|
||||||
(to-load (find-long-option "gnu.load" args)))
|
(to-load (find-long-option "gnu.load" args))
|
||||||
|
(profile (string-append system "/profile"))
|
||||||
|
(bin (string-append profile "/bin"))
|
||||||
|
(sbin (string-append profile "/bin")))
|
||||||
|
|
||||||
(false-if-exception (delete-file "/hurd"))
|
(setenv "PATH" (string-append bin ":" sbin))
|
||||||
(let ((hurd/hurd (readlink* (string-append system "/profile/hurd"))))
|
|
||||||
(symlink hurd/hurd "/hurd"))
|
(when (file-exists? "/var/run/shepherd/socket")
|
||||||
|
(format #t "Removing stale shepherd socket...\n")
|
||||||
|
(delete-file "/var/run/shepherd/socket"))
|
||||||
|
|
||||||
(unless (file-exists? "/servers/startup")
|
(unless (file-exists? "/servers/startup")
|
||||||
(format #t "Creating essential device nodes...\n")
|
(format #t "Creating essential device nodes...\n")
|
||||||
(make-hurd-device-nodes))
|
(make-hurd-device-nodes))
|
||||||
|
|
||||||
|
(let ((profile/hurd (readlink* (string-append profile "/hurd"))))
|
||||||
|
(when (file-exists? "/hurd")
|
||||||
|
(format #t "Removing stale /hurd link\n")
|
||||||
|
(delete-file "/hurd"))
|
||||||
|
(format #t "Linking /hurd from ~a...\n" profile/hurd)
|
||||||
|
(symlink profile/hurd "/hurd"))
|
||||||
|
|
||||||
(format #t "Setting-up essential translators...\n")
|
(format #t "Setting-up essential translators...\n")
|
||||||
(setenv "PATH" (string-append system "/profile/bin"))
|
|
||||||
(set-hurd-device-translators)
|
(set-hurd-device-translators)
|
||||||
|
|
||||||
(format #t "Starting pager...\n")
|
(format #t "Starting pager...\n")
|
||||||
|
|
Loading…
Reference in a new issue