From ca23693d280de5c4031058da4d3041d830080484 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 7 Mar 2018 10:41:06 +0100 Subject: 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. --- gnu/system/mapped-devices.scm | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'gnu/system/mapped-devices.scm') diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index 5ceb5e658c..e6ac635231 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -29,9 +29,9 @@ #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu system uuid) + #:use-module ((gnu system linux-initrd) + #:select (check-device-initrd-modules)) #:autoload (gnu build file-systems) (find-partition-by-luks-uuid) - #:autoload (gnu build linux-modules) - (device-module-aliases matching-modules) #:autoload (gnu packages cryptsetup) (cryptsetup-static) #:autoload (gnu packages linux) (mdadm-static) #:use-module (srfi srfi-1) @@ -154,21 +154,6 @@ #~(zero? (system* #$(file-append cryptsetup-static "/sbin/cryptsetup") "close" #$target))) -(define (check-device-initrd-modules device linux-modules location) - "Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate. -DEVICE must be a \"/dev\" file name." - (let ((modules (delete-duplicates - (append-map matching-modules - (device-module-aliases device))))) - (unless (every (cute member <> linux-modules) modules) - (raise (condition - (&message - (message (format #f (G_ "you may need these modules \ -in the initrd for ~a:~{ ~a~}") - device modules))) - (&error-location - (location (source-properties->location location)))))))) - (define* (check-luks-device md #:key needed-for-boot? (initrd-modules '()) -- cgit v1.2.3