mirror of
https://git.yoctoproject.org/poky
synced 2026-02-11 19:23:03 +01:00
When busybox is used for device management, kernel needs to support older/obsolete mechanism via CONFIG_UEVENT_HELPER and CONFIG_UEVENT_HELPER_PATH to enable /proc/sys/kernel/hotplug but this would require kernel defconfig change and will always be needed when mdev is used, intead run it in daemon mode Update mdev init script to run mdev in daemon mode (From OE-Core rev: f9e84b31ea4afe566c76dcdea25960478cd36ecc) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
641 B
Executable File
641 B
Executable File
#!/bin/sh
Run the mdev daemon
DAEMON="mdev" PIDFILE="/var/run/$DAEMON.pid"
start() { echo -n "Starting $DAEMON... " start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/mdev -- -df [ $? -eq 0 ] && echo "OK" || echo "ERROR"
coldplug modules
find /sys/ -name modalias -print0 |
xargs -0 sort -u |
tr '\n' '\0' |
xargs -0 modprobe -abq
}
stop() { echo -n "Stopping $DAEMON... " start-stop-daemon -K -p $PIDFILE [ $? -eq 0 ] && echo "OK" || echo "ERROR" }
restart() { stop start }
case "$1" in start|stop|restart) "$1" ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac
exit $?