Skip to contentSkip to conversation

eudev: prevent udev init script nonexistent directory error

PATCH New Joshua Henderson 3 participants 4 messages Mar 22, 2018 – Apr 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 package/eudev/S10udev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/eudev/S10udev +1 -1
index 640fec6..47c715c 100755
@@ -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
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 eudev: prevent udev init script nonexistent directory error

Joshua, All,

On 2018-03-22 09:20 -0700, Joshua Henderson spake thusly:

Quoted 8 lines

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.

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 package/eudev/S10udev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/eudev/S10udev +1 -1
index 640fec6..47c715c 100755
@@ -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
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 eudev: prevent udev init script nonexistent directory error

In reply to Joshua Henderson
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joshua" == Joshua Henderson <[email protected]> writes:

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.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 eudev: prevent udev init script nonexistent directory error

In reply to Joshua Henderson
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joshua" == Joshua Henderson <[email protected]> writes:

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.

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard