guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

18/21: WIP: gnu: services: Add `%hurd-bare-metal-service'.


From: guix-commits
Subject: 18/21: WIP: gnu: services: Add `%hurd-bare-metal-service'.
Date: Sun, 10 May 2020 10:07:41 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit f11240ae75b779f9092f5cba8f57ee372b5fe4b6
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Thu Apr 30 15:40:07 2020 +0200

    WIP: gnu: services: Add `%hurd-bare-metal-service'.
    
    * gnu/services.scm (%hurd-system-activation): New procedure.
    (%hurd-bare-metal-service): New variable.
---
 gnu/services.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/services.scm b/gnu/services.scm
index f161635..3309147 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -94,6 +94,7 @@
             activation-service-type
             activation-service->script
             %linux-bare-metal-service
+            %hurd-bare-metal-service
             special-files-service-type
             extra-special-file
             etc-service-type
@@ -631,6 +632,26 @@ ACTIVATION-SCRIPT-TYPE."
                   activation-service-type
                   %linux-kernel-activation))
 
+(define %hurd-system-activation
+  ;; Activation of the Hurd system.
+  #~(begin
+      ;; Tell the kernel to use our 'modprobe' command.
+      (display "Zee Passive Hurd\n")
+      (with-output-to-file "/tmp/before"
+        (lambda _ (display "hallo\n")))
+      (sleep 2)
+      (unless (file-exists? "/hurd")
+        (symlink "/hurd" (string-append #+hurd "/hurd")))
+      (with-output-to-file "/tmp/after"
+        (lambda _ (display "hallo\n")))
+      (display "Zee Active Hurd\n")))
+
+(define %hurd-bare-metal-service
+  ;; The service that does things that are needed on the "bare metal", but not
+  ;; necessary or impossible in a container.
+  (simple-service 'hurd-bare-metal
+                  activation-service-type
+                  %hurd-system-activation))
 
 (define special-files-service-type
   ;; Service to install "special files" such as /bin/sh and /usr/bin/env.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]