summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/busybox/busybox/mdev.cfg2
-rwxr-xr-xmeta/recipes-core/busybox/files/mdev56
2 files changed, 41 insertions, 17 deletions
diff --git a/meta/recipes-core/busybox/busybox/mdev.cfg b/meta/recipes-core/busybox/busybox/mdev.cfg
index 6aefe90e43..143e6097cb 100644
--- a/meta/recipes-core/busybox/busybox/mdev.cfg
+++ b/meta/recipes-core/busybox/busybox/mdev.cfg
@@ -9,3 +9,5 @@ CONFIG_SETSID=y
9CONFIG_CTTYHACK=y 9CONFIG_CTTYHACK=y
10 10
11CONFIG_FEATURE_SHADOWPASSWDS=y 11CONFIG_FEATURE_SHADOWPASSWDS=y
12CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
13CONFIG_FEATURE_MDEV_DAEMON=y
diff --git a/meta/recipes-core/busybox/files/mdev b/meta/recipes-core/busybox/files/mdev
index 8c9c06e96c..2fbdfb073e 100755
--- a/meta/recipes-core/busybox/files/mdev
+++ b/meta/recipes-core/busybox/files/mdev
@@ -1,21 +1,43 @@
1#!/bin/sh 1#!/bin/sh
2mount -t proc proc /proc
3mount -t sysfs sysfs /sys
4mount -t tmpfs tmpfs /dev -o size=64k,mode=0755
5mkdir /dev/pts /dev/shm
6chmod 777 /dev/shm
7mount -t devpts devpts /dev/pts
8touch /dev/mdev.seq
9#sysctl -w kernel.hotplug=/sbin/mdev
10echo "/sbin/mdev" > /proc/sys/kernel/hotplug
11mdev -s
12
13# 2#
14# We might have mounted something over /dev, see if /dev/initctl is there. 3# Run the mdev daemon
15# 4#
16if test ! -p /dev/initctl 5
17then 6DAEMON="mdev"
18 rm -f /dev/initctl 7PIDFILE="/var/run/$DAEMON.pid"
19 mknod -m 600 /dev/initctl p 8
20fi 9
10start() {
11 echo -n "Starting $DAEMON... "
12 start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/mdev -- -df
13 [ $? -eq 0 ] && echo "OK" || echo "ERROR"
14
15 # coldplug modules
16 find /sys/ -name modalias -print0 | \
17 xargs -0 sort -u | \
18 tr '\n' '\0' | \
19 xargs -0 modprobe -abq
20}
21
22stop() {
23 echo -n "Stopping $DAEMON... "
24 start-stop-daemon -K -p $PIDFILE
25 [ $? -eq 0 ] && echo "OK" || echo "ERROR"
26}
27
28restart() {
29 stop
30 start
31}
32
33case "$1" in
34 start|stop|restart)
35 "$1"
36 ;;
37 *)
38 echo "Usage: $0 {start|stop|restart}"
39 exit 1
40esac
41
42exit $?
21 43