]> code.ossystems Code Review - openembedded-core.git/commitdiff
udev: fix uevent-helper disable
authorJohan Hovold <johan@kernel.org>
Fri, 24 Oct 2014 15:39:40 +0000 (17:39 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Nov 2014 10:19:55 +0000 (10:19 +0000)
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>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/udev/udev/init

index 96bd774d2431cfdc406b0cfc21249fc1886c29ef..d26cbfca96c50efa0b2ad94de6f43b2f022a68c9 100644 (file)
@@ -99,7 +99,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