[oe-commits] Johan Hovold : udev: fix uevent-helper disable

git at git.openembedded.org git at git.openembedded.org
Tue Nov 4 12:01:00 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: f7b8445f2e89ad0a59c2859f9eb26855769f1070
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f7b8445f2e89ad0a59c2859f9eb26855769f1070

Author: Johan Hovold <johan at kernel.org>
Date:   Fri Oct 24 17:39:40 2014 +0200

udev: fix uevent-helper disable

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 at kernel.org>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 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 96bd774..d26cbfc 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -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



More information about the Openembedded-commits mailing list