blob: f64c7aafd3fbf47c92c9e2b5a23e7bf53977ba20 [file] [log] [blame]
xf.li86118912025-03-19 20:07:27 -07001#!/bin/sh
2#
3# Run the mdev daemon
4#
5
6DAEMON="mdev"
7PIDFILE="/tmp/run/$DAEMON.pid"
8
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 $?
43