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>master
parent
6a6b8a3fcf
commit
83460433b9
|
@ -281,9 +281,13 @@ second element is the name it should appear at, such as:
|
||||||
|
|
||||||
(define (activate-modprobe modprobe)
|
(define (activate-modprobe modprobe)
|
||||||
"Tell the kernel to use MODPROBE to load modules."
|
"Tell the kernel to use MODPROBE to load modules."
|
||||||
(call-with-output-file "/proc/sys/kernel/modprobe"
|
|
||||||
(lambda (port)
|
;; If the kernel was built without loadable module support, this file is
|
||||||
(display modprobe port))))
|
;; 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)
|
(define (activate-firmware directory)
|
||||||
"Tell the kernel to look for device firmware under DIRECTORY. This
|
"Tell the kernel to look for device firmware under DIRECTORY. This
|
||||||
|
|
Reference in New Issue