Files
libuev/nmeamux/root/etc/init.d/S16coldplug
T
2011-02-21 22:20:14 +01:00

50 lines
846 B
Bash
Executable File

#!/bin/sh
#
# Mdev coldplugging
#
start() {
# Autodetection of hardware
echo -n "Autodetecting hardware ."
MODALIAS=`find /sys/devices -iname modalias -exec cat {} \;`
while [ `echo "$MODALIAS"|wc -l` -gt `echo "$TMODALIAS"|wc -l` ]; do
echo -n "."
for i in $MODALIAS; do
/sbin/modprobe $i 2>/dev/null
done
[ "$VERBOSE" ] && echo Loaded `echo "$MODALIAS"|wc -l` modaliases
[ "$DRV_WAIT" -gt 0 ] && sleep $DRV_WAIT
TMODALIAS="$MODALIAS"
MODALIAS=`find /sys/devices -iname modalias -exec cat {} \;`
done
echo " done."
}
stop() {
:
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac