This commit is contained in:
madsenco committed 2011-02-21 22:20:14 +01:00
1 parent df97341950
commit 76952a692c
6 files changed
+166

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
#! /bin/sh
#
# Beregn afhængigheder mellem moduler, opret modules.dep og load moduler fra /etc/modules.
. /etc/init.d/rcS-helper
start() {
# This will work when busysbox is configured with MODPROBE_SMALL
modprobe depmod-dummy 2>/dev/null
# Loop over every line in /etc/modules.
dmesg -n 5
echo -n 'Loading modules: '
(cat /etc/modules; echo) | # The echo make sure there is a LF at the end.
while read module args; do
case "$module" in
\#*|"") continue ;;
esac
echo -n "$module: "
modprobe $module $args
done
echo ''
dmesg -n 7
}
stop() {
:
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
+49
View File
@@ -0,0 +1,49 @@
#!/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