mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
42
package/busybox/S10mdev
Normal file
42
package/busybox/S10mdev
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/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 $?
|
||||
Reference in New Issue
Block a user