diff --git a/recipes-appends/oe-core/busybox/busybox-mdev.confd b/recipes-appends/oe-core/busybox/busybox-mdev.confd index a9284dc..490220b 100644 --- a/recipes-appends/oe-core/busybox/busybox-mdev.confd +++ b/recipes-appends/oe-core/busybox/busybox-mdev.confd @@ -1,2 +1,2 @@ # Extra arguments to pass to the daemon -COMMAND_ARGS="-s -S" +COMMAND_ARGS="-S" diff --git a/recipes-appends/oe-core/busybox/busybox-mdev.initd b/recipes-appends/oe-core/busybox/busybox-mdev.initd index 37263ab..8e3bab9 100644 --- a/recipes-appends/oe-core/busybox/busybox-mdev.initd +++ b/recipes-appends/oe-core/busybox/busybox-mdev.initd @@ -5,9 +5,24 @@ depend() { before checkfs fsck } -command_args="-df ${COMMAND_ARGS}" -command_background="true" -pidfile="/var/run/busybox-mdev.pid" -command="/sbin/mdev" +start() { + if [ -e /proc/sys/kernel/hotplug ]; then + ebegin "Registering mdev as hotplug agent" + echo "/sbin/mdev" > /proc/sys/kernel/hotplug + eend $? + fi + + ebegin "Populating /dev with mdev" + /sbin/mdev -s ${COMMAND_ARGS} + eend $? +} + +stop() { + if [ -e /proc/sys/kernel/hotplug ]; then + ebegin "Removing mdev as hotplug agent" + echo "/sbin/mdev" > /proc/sys/kernel/hotplug + eend $? + fi +} # vim: noet ft=gentoo-init-d