|
|
#!/bin/bash
echo "Trying to autodetect hardware..."
/bin/hwscan >/tmp/hardware
if [ `grep -c '^# ' /tmp/hardware` -gt 0 ] ; then echo 'Found the following:' grep '^# ' /tmp/hardware | sed 's,^# ,- ,g' echo 'Now trying to initialise them...' . /tmp/hardware fi
# looks like hwscan just silently fails if something is missing # for example it says it found 0 modules, while executing that # find command brings up 400-odd files. We'll just load # _everything_ in that case. if [ ! -s /tmp/hardware ] ; then echo "EEP! hwscan screwed up!" echo -n "Trying emergency module loading ... " for x in `find /lib/modules/ -name '*.o'` ; do insmod ${x} >/dev/null 2>&1 done echo "done" fi
if [ ! -e /dev/sound/dsp ] ; then echo 'EEP! We have no sound!' echo 'You can switch to another console with -<Alt>- + -<F2>- to try' echo 'and load a sound-module by hand.' echo echo 'Press -<Enter>- when done to continue ...' read fi
exit 0
|