linux-boot: Update 'make-hurd-device-nodes'.
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>
Sun, 24 May 2020 10:41:32 +0000 (12:41 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Mon, 8 Jun 2020 11:51:18 +0000 (13:51 +0200)
* gnu/build/linux-boot.scm (make-hurd-device-nodes): Avoid de-duplication of
device mount points; also create mount points for /servers/.

gnu/build/linux-boot.scm

index f08bb11..d62c670 100644 (file)
@@ -337,6 +337,7 @@ one specific hardware device. These we have to create."
   (for-each (lambda (file)
               (call-with-output-file (scope file)
                 (lambda (port)
+                  (display file port)   ;avoid hard-linking
                   (chmod port #o666))))
             '("dev/null"
               "dev/zero"
@@ -347,6 +348,20 @@ one specific hardware device. These we have to create."
   ;; console-run on first boot.
 
   (mkdir (scope "servers"))
+  (for-each (lambda (file)
+              (call-with-output-file (scope (string-append "servers/" file))
+                (lambda (port)
+                  (display file port)   ;avoid hard-linking
+                  (chmod port #o444))))
+            '("startup"
+              "exec"
+              "proc"
+              "password"
+              "default-pager"
+              "crash-dump-core"
+              "kill"
+              "suspend"))
+
   (mkdir (scope "servers/socket"))
   ;; Don't create /servers/socket/1 & co: runsystem does that on first boot.