janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 8c8313d709674ede5885890a6742baf77bb0afa0
Author: Jan (janneke) Nieuwenhuizen <[email protected]>
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.