diff options
author | Ivan Kozlov <kanichos@yandex.ru> | 2020-04-04 19:16:15 +0300 |
---|---|---|
committer | Danny Milosavljevic <dannym@scratchpost.org> | 2020-04-04 21:13:26 +0200 |
commit | b2fff3b5de7d510fe4809e9a97089dddf2a39ffc (patch) | |
tree | f9c428d0ebb18cfd58b24547f2682fc4482f4b01 | |
parent | 5a46779e9f418b89137b315ba15d5c5ea30ca540 (diff) | |
download | patches-b2fff3b5de7d510fe4809e9a97089dddf2a39ffc.tar patches-b2fff3b5de7d510fe4809e9a97089dddf2a39ffc.tar.gz |
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>
-rw-r--r-- | gnu/system.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index d79ea23f98..fd456c6206 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -477,13 +477,19 @@ OS." value of the SYSTEM-SERVICE-TYPE service." (let ((locale (operating-system-locale-directory os))) (mlet* %store-monad ((kernel -> (operating-system-kernel os)) + (kernel-modules (package-file kernel "lib/modules")) (modules -> (operating-system-kernel-loadable-modules os)) + (has-modules? -> + (or (not (null? modules)) + (file-exists? kernel-modules))) (kernel (profile-derivation (packages->manifest (cons kernel modules)) - #:hooks (list linux-module-database))) + #:hooks (if has-modules? + (list linux-module-database) + '()))) (initrd -> (operating-system-initrd-file os)) (params (operating-system-boot-parameters-file os))) (return `(("kernel" ,kernel) |