summaryrefslogtreecommitdiffstats
path: root/init.d
diff options
context:
space:
mode:
authorncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371>2008-08-28 14:34:18 +0000
committerncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371>2008-08-28 14:34:18 +0000
commit03dbfeba2024b71f95bde3b4b9ec81da3de58ef3 (patch)
tree869bde9c97ee2649b0452a9db18e9f5844546ac6 /init.d
parent53e529197eb673a624912810e905c3434dd4740a (diff)
downloadalpine-baselayout-03dbfeba2024b71f95bde3b4b9ec81da3de58ef3.tar.bz2
alpine-baselayout-03dbfeba2024b71f95bde3b4b9ec81da3de58ef3.tar.xz
sort kernel modules load order by alias name
Diffstat (limited to 'init.d')
-rwxr-xr-xinit.d/hwdrivers19
1 files changed, 3 insertions, 16 deletions
diff --git a/init.d/hwdrivers b/init.d/hwdrivers
index de0e34a..de3ce50 100755
--- a/init.d/hwdrivers
+++ b/init.d/hwdrivers
@@ -1,16 +1,5 @@
#!/sbin/runscript
-SEC=`date +%s`
-
-# echo a . every second
-timer_dots() {
- local newsec=`date +%s`
- if [ "$SEC" != "$newsec" ] ; then
- echo -n '.'
- SEC=$newsec
- fi
-}
-
# Load hardware drivers
start() {
# check for boot option "nocoldplug"
@@ -33,13 +22,11 @@ start() {
fi
[ "$MODULES" ] && modprobe $MODULES 2> /dev/null
- timer_dots
if [ "$AUTODETECT" != no ] ; then
- find /sys -name modalias | while read a ; do
- modprobe `cat $a` 2>/dev/null || \
- echo $a >> /tmp/hwdrivers.failed
- timer_dots
+ find /sys -name modalias | xargs sort | while read a ; do
+ modprobe $a 2>/dev/null \
+ || echo $a >> /tmp/hwdrivers.failed
done
fi
eend 0