mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 06:06:53 -05:00
system: Don’t create a module database when no modules are available.
* gnu/system.scm (operating-system-directory-base-entries): Don't create a module database when no modules are available. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
This commit is contained in:
parent
5a46779e9f
commit
b2fff3b5de
1 changed files with 7 additions and 1 deletions
|
@ -477,13 +477,19 @@ (define* (operating-system-directory-base-entries os)
|
||||||
value of the SYSTEM-SERVICE-TYPE service."
|
value of the SYSTEM-SERVICE-TYPE service."
|
||||||
(let ((locale (operating-system-locale-directory os)))
|
(let ((locale (operating-system-locale-directory os)))
|
||||||
(mlet* %store-monad ((kernel -> (operating-system-kernel os))
|
(mlet* %store-monad ((kernel -> (operating-system-kernel os))
|
||||||
|
(kernel-modules (package-file kernel "lib/modules"))
|
||||||
(modules ->
|
(modules ->
|
||||||
(operating-system-kernel-loadable-modules os))
|
(operating-system-kernel-loadable-modules os))
|
||||||
|
(has-modules? ->
|
||||||
|
(or (not (null? modules))
|
||||||
|
(file-exists? kernel-modules)))
|
||||||
(kernel
|
(kernel
|
||||||
(profile-derivation
|
(profile-derivation
|
||||||
(packages->manifest
|
(packages->manifest
|
||||||
(cons kernel modules))
|
(cons kernel modules))
|
||||||
#:hooks (list linux-module-database)))
|
#:hooks (if has-modules?
|
||||||
|
(list linux-module-database)
|
||||||
|
'())))
|
||||||
(initrd -> (operating-system-initrd-file os))
|
(initrd -> (operating-system-initrd-file os))
|
||||||
(params (operating-system-boot-parameters-file os)))
|
(params (operating-system-boot-parameters-file os)))
|
||||||
(return `(("kernel" ,kernel)
|
(return `(("kernel" ,kernel)
|
||||||
|
|
Loading…
Reference in a new issue