package/busybox: convert S10mdev to the canonical init script format
authorTitouan Christophe <titouan.christophe@railnova.eu>
Wed, 19 Jun 2019 16:42:56 +0000 (18:42 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 20 Jun 2019 14:08:10 +0000 (16:08 +0200)
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/busybox/S10mdev

index 7075b770166fe10ee587a6c87a4bdd92769b9674..efef4290bad472e589fd0f138efe00106e7d3968 100644 (file)
@@ -3,21 +3,24 @@
 # Start mdev....
 #
 
-case "$1" in
-  start)
+
+start() {
        echo "Starting mdev..."
        echo /sbin/mdev >/proc/sys/kernel/hotplug
        /sbin/mdev -s
        # coldplug modules
-       find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \
-           xargs -0 modprobe -abq
-       ;;
-  stop)
-       ;;
-  restart|reload)
+       find /sys/ -name modalias -print0 | \
+               xargs -0 sort -u | \
+               tr '\n' '\0' | \
+               xargs -0 modprobe -abq
+}
+
+case "$1" in
+  start)
+       "$1"
        ;;
   *)
-       echo "Usage: $0 {start|stop|restart}"
+       echo "Usage: $0 start"
        exit 1
 esac