all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: kanichos@yandex.ru
Cc: 38871-done@debbugs.gnu.org
Subject: bug#38871: Add a check before activating modprobe
Date: Mon, 06 Jan 2020 16:32:36 +0100	[thread overview]
Message-ID: <87k164bnxn.fsf@gnu.org> (raw)
In-Reply-To: <2023261577967225@iva2-d0266d205f48.qloud-c.yandex.net> (kanichos@yandex.ru's message of "Thu, 02 Jan 2020 15:13:45 +0300")

Hello,

kanichos@yandex.ru skribis:

> Currently an activation service unconditionally tries to set up a modprobe wrapper by writing to /proc/sys/kernel/modprobe. This breaks if the kernel is built without loadable module support, Shepherd completely aborts. I believe there is no reason for it to be so. Just add a simple check for the existence of this /proc node.
>
> ---
>  gnu/build/activation.scm | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
> index c6c7e7fd3b..f7a5e53e79 100644
> --- a/gnu/build/activation.scm
> +++ b/gnu/build/activation.scm
> @@ -269,9 +269,10 @@ second element is the name it should appear at, such as:
>  
>  (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 (file-exists? "/proc/sys/kernel/modprobe")
> +    (call-with-output-file "/proc/sys/kernel/modprobe"

Applied with minor tweaks.

However, I suspect other issues will come up if you try to use a kernel
without loadable module support.  For instance, you’ll have to set:

  (initrd-modules '())

in your OS config file.

Thanks,
Ludo’.

      reply	other threads:[~2020-01-06 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 12:13 [bug#38871] Add a check before activating modprobe kanichos
2020-01-06 15:32 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k164bnxn.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=38871-done@debbugs.gnu.org \
    --cc=kanichos@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.