#!/bin/bash echo "Trying to autodetect hardware..." read a b version c < /proc/version/bin/hwscan -k ${version} >/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/hardwarefi # 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 '*.ko'` ; 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 ...' readfi if [ ! -e /dev/sound/dsp ] ; then echo "Still no sound. Continuing anyway"fi exit 0
#!/bin/bash
echo "Trying to autodetect hardware..."
read a b version c < /proc/version
/bin/hwscan -k ${version} >/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 '*.ko'` ; do
insmod ${x} >/dev/null 2>&1
done
echo "done"
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
echo "Still no sound. Continuing anyway"
exit 0