#!/bin/sh # # $Id: rc.isdn,v 1.7.2.3 2005/07/07 20:11:58 franck78 Exp $ # eval $(/usr/local/bin/readhash CONFIG_ROOT/isdn/settings) # Debugging. Comment it out to stop logging DEBUG="yes" msg() { if [ "z$DEBUG" != "z" ] ; then /usr/bin/logger -t red "ISDN: $*" fi echo "$*" } # See how we were called. case "$1" in start) if [ "$ENABLED" = "on" ]; then /sbin/rmmod hisax_st5481 2>/dev/null /sbin/rmmod hisax_fcpcipnp 2>/dev/null /sbin/rmmod hisax_isac 2>/dev/null /sbin/rmmod hisax 2>/dev/null if [ "$TYPE" = "998" ]; then /sbin/modprobe hisax_st5481 protocol=$PROTOCOL $MODULE_PARAMS exit $? elif [ "$TYPE" = "999" ]; then /sbin/modprobe hisax_fcpcipnp protocol=$PROTOCOL $MODULE_PARAMS exit $? else /sbin/modprobe hisax protocol=$PROTOCOL type=$TYPE $MODULE_PARAMS exit $? fi else msg "No ISDN enabled" exit 1 fi ;; stop) /sbin/ifconfig ippp1 down 2>/dev/null /sbin/ifconfig ippp0 down 2>/dev/null /usr/sbin/isdnctrl delif ippp1 2>/dev/null /usr/sbin/isdnctrl delif ippp0 2>/dev/null /bin/killall ipppd 2>/dev/null /bin/killall ibod 2>/dev/null /sbin/rmmod hisax_st5481 2>/dev/null /sbin/rmmod hisax_fcpcipnp 2>/dev/null /sbin/rmmod hisax_isac 2>/dev/null /sbin/rmmod hisax 2>/dev/null ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac exit 0