View Single Post
  #2   (View Single Post)  
Old 1st May 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Old man from scene 24
Join Date: Apr 2008
Location: Dutchman living in the UK
Posts: 2,199

Here is a script that will load the sound drivers one by one, detect which one you're using, and add it to /boot/loader.conf.

This will work on any version of FreeBSD.

# Detect sound driver

for driver in /boot/kernel/snd_*; do
  driver=$(echo ${driver} | sed 's|/boot/kernel/snd_||')
  if [ ${driver} = "driver.ko" ]; then

  kldload snd_${driver}
  if [ -c /dev/mixer0 ]; then
    echo "I'm smelling 'snd_${driver}'"
    echo "snd_${driver}_load=\"YES\"" >> /boot/loader.conf
    exit 0
  kldunload snd_${driver}
Attached Files
File Type: sh (374 Bytes, 149 views)
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote