#!/bin/bash # $Id: isdn,v 1.2 2001/09/28 15:31:22 latu Exp $ case "$1" in start) echo -n "Starting isdn configuration: " /sbin/modprobe hisax echo -n isdn echo touch /var/lock/subsys/isdn ;; stop) echo -n "Stopping isdn configuration: " /sbin/rmmod -s hisax /sbin/rmmod -s isdn /sbin/rmmod -s slhc rm -f /var/lock/subsys/isdn echo -n isdn echo ;; restart) $0 stop $0 start ;; status) cat /proc/devices | grep -q "\(isdn\)" if [ $? = 0 ]; then lsmod | grep -q "\(slhc\|isdn\|hisax\)" echo "isdn card detected." else echo "Isdn card not configured." fi ;; *) echo "Usage: isdn {start|stop|status|restart}" exit 1 esac exit 0