xf.li | 8611891 | 2025-03-19 20:07:27 -0700 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Run the mdev daemon |
| 4 | # |
| 5 | |
| 6 | DAEMON="mdev" |
| 7 | PIDFILE="/tmp/run/$DAEMON.pid" |
| 8 | |
| 9 | |
| 10 | start() { |
| 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 | |
| 22 | stop() { |
| 23 | echo -n "Stopping $DAEMON... " |
| 24 | start-stop-daemon -K -p $PIDFILE |
| 25 | [ $? -eq 0 ] && echo "OK" || echo "ERROR" |
| 26 | } |
| 27 | |
| 28 | restart() { |
| 29 | stop |
| 30 | start |
| 31 | } |
| 32 | |
| 33 | case "$1" in |
| 34 | start|stop|restart) |
| 35 | "$1" |
| 36 | ;; |
| 37 | *) |
| 38 | echo "Usage: $0 {start|stop|restart}" |
| 39 | exit 1 |
| 40 | esac |
| 41 | |
| 42 | exit $? |
| 43 | |