mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
activation: Check whether /proc/sys/kernel/modprobe exists.
* gnu/build/activation.scm (activate-modprobe): Check whether /proc/sys/kernel/modprobe exists before writing to it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
6a6b8a3fcf
commit
83460433b9
1 changed files with 7 additions and 3 deletions
|
@ -281,9 +281,13 @@ (define install-special-file
|
|||
|
||||
(define (activate-modprobe modprobe)
|
||||
"Tell the kernel to use MODPROBE to load modules."
|
||||
(call-with-output-file "/proc/sys/kernel/modprobe"
|
||||
(lambda (port)
|
||||
(display modprobe port))))
|
||||
|
||||
;; If the kernel was built without loadable module support, this file is
|
||||
;; unavailable, so check for its existence first.
|
||||
(when (file-exists? "/proc/sys/kernel/modprobe")
|
||||
(call-with-output-file "/proc/sys/kernel/modprobe"
|
||||
(lambda (port)
|
||||
(display modprobe port)))))
|
||||
|
||||
(define (activate-firmware directory)
|
||||
"Tell the kernel to look for device firmware under DIRECTORY. This
|
||||
|
|
Loading…
Reference in a new issue