mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
944 B

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