diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-03-07 10:41:06 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-03-07 11:22:42 +0100 |
commit | ca23693d280de5c4031058da4d3041d830080484 (patch) | |
tree | ccd3a61edd11e3634895f5f2e792b306b71e586b /guix/scripts | |
parent | 6c4458172d12dbda969c2eae5b3b6be19a068780 (diff) | |
download | gnu-guix-ca23693d280de5c4031058da4d3041d830080484.tar gnu-guix-ca23693d280de5c4031058da4d3041d830080484.tar.gz |
linux-initrd: Factorize 'check-device-initrd-modules'.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Move to...
* gnu/system/linux-initrd.scm (check-device-initrd-modules): ... here.
New procedure.
* po/guix/POTFILES.in: Add it.
* guix/scripts/system.scm (check-initrd-modules)[check-device]: Remove.
Use 'check-device-initrd-modules' instead.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/system.scm | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index ff322ec785..acfccce96d 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -43,8 +43,7 @@ (find-partition-by-label find-partition-by-uuid) #:autoload (gnu build linux-modules) (device-module-aliases matching-modules) - #:autoload (gnu system linux-initrd) - (base-initrd default-initrd-modules) + #:use-module (gnu system linux-initrd) #:use-module (gnu system) #:use-module (gnu bootloader) #:use-module (gnu system file-systems) @@ -661,27 +660,15 @@ checking this by themselves in their 'check' procedure." ('uuid (find-partition-by-uuid device)) ('label (find-partition-by-label device))))) - (define (check-device device location) - (let ((modules (delete-duplicates - (append-map matching-modules - (device-module-aliases device))))) - (unless (every (cute member <> (operating-system-initrd-modules os)) - modules) - (raise (condition - (&message - (message (format #f (G_ "you need these modules \ -in the initrd for ~a:~{ ~a~}") - device modules))) - (&error-location (location location))))))) - (define file-systems (filter file-system-needed-for-boot? (operating-system-file-systems os))) (for-each (lambda (fs) - (check-device (file-system-/dev fs) - (source-properties->location - (file-system-location fs)))) + (check-device-initrd-modules (file-system-/dev fs) + (operating-system-initrd-modules os) + (source-properties->location + (file-system-location fs)))) file-systems)) |