From dbed429e925e5c8d46001d05c076aca3bb75165d Mon Sep 17 00:00:00 2001 From: xSmurf Date: Mon, 21 Sep 2015 22:05:59 +0000 Subject: [PATCH] Fixed stop/start autodev --- .../rootfs-additions/etc/init.d/S10autodev | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/board/coreboot/rootfs-additions/etc/init.d/S10autodev b/board/coreboot/rootfs-additions/etc/init.d/S10autodev index d0ab302..38f15a0 100755 --- a/board/coreboot/rootfs-additions/etc/init.d/S10autodev +++ b/board/coreboot/rootfs-additions/etc/init.d/S10autodev @@ -3,17 +3,30 @@ # Start autodev # +do_start() { + echo "Starting module autoload..." + echo /opt/sbin/autoload_modules > /proc/sys/kernel/hotplug + /opt/sbin/autoload_modules +} + +do_stop() { + echo > /proc/sys/kernel/hotplug +} + case "$1" in start) - echo "Starting module autoload..." - /opt/sbin/autoload_modules + do_start; ;; stop) + do_stop; ;; restart|reload) + do_stop; + sleep 2; + do_start; ;; *) - echo "Usage: $0 {start}" + echo "Usage: $0 {start|restart|stop}" exit 1 esac