[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
44/47: hurd-boot: Support system init: Create essential device nodes.
From: |
guix-commits |
Subject: |
44/47: hurd-boot: Support system init: Create essential device nodes. |
Date: |
Sat, 3 Jun 2023 07:23:47 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd
in repository guix.
commit dd8a2998fa871241b60ca153ab0528f3e26f9097
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue May 30 18:07:17 2023 +0200
hurd-boot: Support system init: Create essential device nodes.
* gnu/build/hurd-boot.scm (make-hurd-device-nodes): Cater for existing
directories (dev, servers).
(set-hurd-device-translators): Remove /servers/socket/1, that is created by
libexec/console-run. Cater for nonexistent /dev/console.
(boot-hurd-system): Call make-hurd-device-nodes on initial run.
---
gnu/build/hurd-boot.scm | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index a9700fd1cd..d3f9daeec0 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -79,13 +79,13 @@ Return the value associated with OPTION, or #f on failure."
(define (scope dir)
(string-append root (if (string-suffix? "/" root) "" "/") dir))
- (mkdir (scope "dev"))
+ (mkdir-p (scope "dev"))
;; Don't create /dev/null etc just yet; the store
;; messes-up the permission bits.
;; Don't create /dev/console, /dev/vcs, etc.: they are created by
;; console-run on first boot.
- (mkdir (scope "servers"))
+ (mkdir-p (scope "servers"))
(for-each (lambda (file)
(call-with-output-file (scope (string-append "servers/" file))
(lambda (port)
@@ -100,7 +100,8 @@ Return the value associated with OPTION, or #f on failure."
"kill"
"suspend"))
- (mkdir (scope "servers/socket"))
+ (mkdir-p (scope "servers/socket"))
+
;; Don't create /servers/socket/1 & co: runsystem does that on first boot.
;; TODO: Set the 'gnu.translator' extended attribute for passive translator
@@ -266,7 +267,8 @@ set."
(for-each scope-set-translator servers)
(mkdir* "dev/vcs/1")
(mkdir* "dev/vcs/2")
- (rename-file (scope "dev/console") (scope "dev/console-"))
+ (when (file-exists? (scope "dev/console"))
+ (rename-file (scope "dev/console") (scope "dev/console-")))
(for-each scope-set-translator devices)
(false-if-EEXIST (symlink "/dev/random" (scope "dev/urandom")))
@@ -313,6 +315,10 @@ XXX TODO: use Linux xattr/setxattr to remove (settrans in)
/libexec/RUNSYSTEM
(let ((hurd/hurd (readlink* (string-append system "/profile/hurd"))))
(symlink hurd/hurd "/hurd"))
+ (unless (file-exists? "/servers/startup")
+ (format #t "Creating essential device nodes...\n")
+ (make-hurd-device-nodes))
+
(format #t "Setting-up essential translators...\n")
(setenv "PATH" (string-append system "/profile/bin"))
(set-hurd-device-translators)
- 35/47: Revert "gnu: libunistring: Fix make check for the Hurd.", (continued)
- 35/47: Revert "gnu: libunistring: Fix make check for the Hurd.", guix-commits, 2023/06/03
- 37/47: gnu: coreutils: Skip hanging and failing test for the Hurd., guix-commits, 2023/06/03
- 39/47: Revert "gnu: sed: Skip failing test on GNU/Hurd.", guix-commits, 2023/06/03
- 40/47: gnu: findutils: Move test-strerror_r from XFAIL to skip for the Hurd., guix-commits, 2023/06/03
- 09/47: Revert "hurd-boot: Add urandom and default-pager translators.", guix-commits, 2023/06/03
- 12/47: gnu: hurd: Update libpciaccess to 0.17., guix-commits, 2023/06/03
- 22/47: gnu: netdde: Resurrect and update to 2.6.32.65-2-e67c284ac1., guix-commits, 2023/06/03
- 41/47: gnu: diffutils: Remove test-perror2 from XFAIL_TESTS for the Hurd., guix-commits, 2023/06/03
- 08/47: gnu: hurd: Update to v0.9.git20230216., guix-commits, 2023/06/03
- 32/47: gnu: commencement: hurd-minimal-boot0: Update to 0.9.git20230216., guix-commits, 2023/06/03
- 44/47: hurd-boot: Support system init: Create essential device nodes.,
guix-commits <=
- 47/47: DRAFT system: examples: Add devel-hurd.tmpl., guix-commits, 2023/06/03
- 43/47: hurd: Support system init in /libexec/runsystem., guix-commits, 2023/06/03
- 45/47: DRAFT hurd: Support second boot., guix-commits, 2023/06/03
- 46/47: DRAFT hurd-boot: Support second boot., guix-commits, 2023/06/03
- 20/47: bootloader: grub: Use rumpdisk-style root when booting with "noide"., guix-commits, 2023/06/03
- 29/47: gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20221224., guix-commits, 2023/06/03
- 36/47: gnu: guile: Skip hanging and failing pipe tests on the Hurd., guix-commits, 2023/06/03
- 38/47: gnu: grep: Update hanging and failing tests for the Hurd., guix-commits, 2023/06/03
- 24/47: system: hurd: Add netdde to %base-packages/hurd., guix-commits, 2023/06/03
- 18/47: services: childhurd: Bump default qemu memory to 2048MB., guix-commits, 2023/06/03