Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] udev: fix uevent-helper disable
Date: Fri, 24 Oct 2014 17:39:40 +0200	[thread overview]
Message-ID: <1414165180-6770-1-git-send-email-johan@kernel.org> (raw)

Make sure that /proc/sys/kernel/hotplug exists before trying to disable
the uevent-helper mechanism.

Since kernel commit 86d56134f1b6 ("kobject: Make support for
uevent_helper optional.") the kernel can be built without uevent-helper
support. In this case /proc/sys/kernel/hotplug does not exist and the
current sysvinit script fails with

	/etc/rcS.d/S04udev: line 132: can't create /proc/sys/kernel/hotplug: nonexistent directory

when trying to disable the uevent-helper mechanism during boot.

Note that a single NULL-character has always been sufficient to disable.

Signed-off-by: Johan Hovold <johan@kernel.org>
---

Patch is against daisy-11.0.1 but should apply fine to master. All
branches affected.

Thanks,
Johan


 meta/recipes-core/udev/udev/init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 410a650bd192..63e59d3950c9 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -97,7 +97,7 @@ case "$1" in
     kill_udevd > "/dev/null" 2>&1
 
     # trigger the sorted events
-    echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+    [ -e /proc/sys/kernel/hotplug ] && echo -e '\000' >/proc/sys/kernel/hotplug
     @UDEVD@ -d
 
     udevadm control --env=STARTUP=1
-- 
2.0.4



                 reply	other threads:[~2014-10-24 15:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1414165180-6770-1-git-send-email-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=openembedded-core@lists.openembedded.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox