diff options
author | Mark H Weaver <mhw@netris.org> | 2015-09-22 16:38:48 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-09-22 16:38:48 -0400 |
commit | bd90127ad43d08c39e5bd592d03f7c0a4c683afe (patch) | |
tree | c840851273e349cb0aee31cb5958acdf093c819a /gnu/system.scm | |
parent | 5f20553dee3fbc924b0cafb54ac215b0d3bf344c (diff) | |
parent | 430505eba33b7bb59fa2d22e0f21ff317cbc320d (diff) | |
download | guix-bd90127ad43d08c39e5bd592d03f7c0a4c683afe.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/system.scm')
-rw-r--r-- | gnu/system.scm | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index ea6e9c13ea..cee5f37bcb 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -83,6 +83,11 @@ operating-system-derivation operating-system-profile operating-system-grub.cfg + operating-system-etc-directory + operating-system-locale-directory + operating-system-boot-script + + file-union local-host-aliases %setuid-programs @@ -689,7 +694,7 @@ variable is not set---hence the need for this wrapper." (apply execl #$modprobe (cons #$modprobe (cdr (command-line)))))))) -(define (operating-system-activation-script os) +(define* (operating-system-activation-script os #:key container?) "Return the activation script for OS---i.e., the code that \"activates\" the stateful part of OS, including user accounts and groups, special directories, etc." @@ -763,12 +768,15 @@ etc." ;; Tell the kernel to use our 'modprobe' command. (activate-modprobe #$modprobe) - ;; Tell the kernel where firmware is. - (activate-firmware - (string-append #$firmware "/lib/firmware")) - - ;; Let users debug their own processes! - (activate-ptrace-attach) + ;; Tell the kernel where firmware is, unless we are + ;; activating a container. + #$@(if container? + #~() + ;; Tell the kernel where firmware is. + #~((activate-firmware + (string-append #$firmware "/lib/firmware")) + ;; Let users debug their own processes! + (activate-ptrace-attach))) ;; Run the services' activation snippets. ;; TODO: Use 'load-compiled'. @@ -777,11 +785,13 @@ etc." ;; Set up /run/current-system. (activate-current-system))))) -(define (operating-system-boot-script os) +(define* (operating-system-boot-script os #:key container?) "Return the boot script for OS---i.e., the code started by the initrd once -we're running in the final root." +we're running in the final root. When CONTAINER? is true, skip all +hardware-related operations as necessary when booting a Linux container." (mlet* %store-monad ((services (operating-system-services os)) - (activate (operating-system-activation-script os)) + (activate (operating-system-activation-script + os #:container? container?)) (dmd-conf (dmd-configuration-file services))) (gexp->file "boot" #~(begin |