From: Joshua Henderson Date: Thu, 22 Mar 2018 16:20:01 +0000 (-0700) Subject: eudev: prevent udev init script nonexistent directory error X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cbe725d755006e41a71180b5786fa9f52104f518;p=buildroot.git eudev: prevent udev init script nonexistent directory error The following error occures in the udev init script because the kernel config may optionally not include uevent_helper. /etc/init.d/S10udev: line 47: can't create /proc/sys/kernel/hotplug: nonexistent directory Work around this by not trying to access the destination if it's not available. Signed-off-by: Joshua Henderson Acked-by: "Yann E. MORIN" Signed-off-by: Peter Korsgaard --- diff --git a/package/eudev/S10udev b/package/eudev/S10udev index 640fec625b..47c715c886 100755 --- a/package/eudev/S10udev +++ b/package/eudev/S10udev @@ -28,7 +28,7 @@ test -r $UDEV_CONFIG || exit 6 case "$1" in start) printf "Populating %s using udev: " "${udev_root:-/dev}" - printf '\000\000\000\000' > /proc/sys/kernel/hotplug + [ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug $UDEV_BIN -d || { echo "FAIL"; exit 1; } udevadm trigger --type=subsystems --action=add udevadm trigger --type=devices --action=add