added preload module check, for hotplug distros

This commit is contained in:
Chrisian Richter 2006-02-10 21:43:41 +00:00
parent 824a3f4a5f
commit 9dd14368ee
1 changed files with 12 additions and 0 deletions

View File

@ -48,6 +48,16 @@ ulaw=8
dtmf=9
pcm_slave=11
function remove_preloaded_modules {
tmp=$(lsmod)
cards="hfcmulti hfcpci avmfritz w6692 hfcusb"
for i in $cards ; do
echo $tmp | grep $i >/dev/null && (echo "$i already loaded, removing it"; modprobe -r $i)
done
}
function load_card_modules {
IFS=$'\n'
@ -455,6 +465,8 @@ function check_cfg_file {
case "$1" in
start|--start)
remove_preloaded_modules
check_cfg_file
$MODPROBE mISDN_core debug=0