linux-initrd: Skip initrd module check when 'modules.alias' can't be found.
Fixes <https://bugs.gnu.org/30760>. Reported by Tomáš Čech <sleep_walker@gnu.org>. * gnu/system/linux-initrd.scm (check-device-initrd-modules): Call 'known-module-aliases' and catch 'system-error around it. Pass it to 'matching-modules'.
This commit is contained in:
parent
464f544739
commit
8d5c14edf5
|
@ -353,8 +353,18 @@ loaded at boot time in the order in which they appear."
|
||||||
(define (check-device-initrd-modules device linux-modules location)
|
(define (check-device-initrd-modules device linux-modules location)
|
||||||
"Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate.
|
"Raise an error if DEVICE needs modules beyond LINUX-MODULES to operate.
|
||||||
DEVICE must be a \"/dev\" file name."
|
DEVICE must be a \"/dev\" file name."
|
||||||
|
(define aliases
|
||||||
|
;; Attempt to load 'modules.alias' from the current kernel, assuming we're
|
||||||
|
;; on GuixSD, and assuming that corresponds to the kernel we'll be
|
||||||
|
;; installing. Skip the whole thing if that file cannot be read.
|
||||||
|
(catch 'system-error
|
||||||
|
(lambda ()
|
||||||
|
(known-module-aliases))
|
||||||
|
(const #f)))
|
||||||
|
|
||||||
|
(when aliases
|
||||||
(let ((modules (delete-duplicates
|
(let ((modules (delete-duplicates
|
||||||
(append-map matching-modules
|
(append-map (cut matching-modules <> aliases)
|
||||||
(device-module-aliases device)))))
|
(device-module-aliases device)))))
|
||||||
(unless (every (cute member <> linux-modules) modules)
|
(unless (every (cute member <> linux-modules) modules)
|
||||||
(raise (condition
|
(raise (condition
|
||||||
|
@ -375,6 +385,6 @@ these lines:
|
||||||
@end example\n")
|
@end example\n")
|
||||||
modules)))
|
modules)))
|
||||||
(&error-location
|
(&error-location
|
||||||
(location (source-properties->location location))))))))
|
(location (source-properties->location location)))))))))
|
||||||
|
|
||||||
;;; linux-initrd.scm ends here
|
;;; linux-initrd.scm ends here
|
||||||
|
|
Loading…
Reference in New Issue