#!/bin/bash

LSMOD="/sbin/lsmod"
RMMOD="/sbin/rmmod"

if [ -r /proc/asound/seq/drivers ]; then
  aconnect -x
fi
$LSMOD | grep "^snd" | while read line; do \
  XX=`echo $line | cut -d ' ' -f 1`; \
  $RMMOD $XX; \
done
rmmod isapnp 2> /dev/null
echo "Remove done..."

