以下的的rc.config文件装载了初始化的必要组元
。 #!/bin/bash
# This is adapted Bernhard Hailers old script
LOCAL_NUMBER="91311234" # tel no. 091311234
REMOTE_NUMBER="0911123456" # I tel no.
LOCAL_IP="192.168.0.99" # I have dynamic IP so this will do
REMOTE_IP="195.112.123.11" # your I gateway
DEVICE="i0"
SYATH="/in"
ISDNCTRL="$YATH/isdnctrl"
case "$1" in
start)
# turn on isdn
imod /lib/modules/2.0.33/net/slhc.o
imod /lib/modules/2.0.33/misc/isdn.o
sleep 1
# load the hisax module
imod /lib/modules/2.0.33/misc/hisax.o
id=Tel0 type=5 protocol=2 irq=10 io=0x300
echo "starting isdn4
linux"
# global
$ISDNCTRL verbose 0
$ISDNCTRL addif $DEVICE # create new interface
$ISDNCTRL addphone $DEVICE in $REMOTE_NUMBER
$ISDNCTRL addphone $DEVICE out $REMOTE_NUMBER
$ISDNCTRL eaz $DEVICE $LOCAL_NUMBER
$ISDNCTRL l2_prot $DEVICE hdlc
$ISDNCTRL l3_prot $DEVICE tra
$ISDNCTRL encap $DEVICE sync
$ISDNCTRL huptimeout $DEVICE 300
$ISDNCTRL chargehup $DEVICE off
$ISDNCTRL secure $DEVICE on
$YATH/ifconfig $DEVICE $LOCAL_IP pointopoint $REMOTE_IP metric 1
$YATH/route add default $DEVICE
$YATH/id /dev/i0 file /etc//optio.id &am
$YATH/route del default
stop)
#turn off isdn
rmmod hisax.o
sleep 1
rmmod isdn.o
rmmod slhc.o
echo "Shutting down isdn4
linux"
$ISDNCTRL delif i0
*)
echo "Usage: $0 (start|stop)"
exit 1
esac