#!/bin/bash # # ISDN-configuration script by Robert Grefstad, robertgr@online.no # needs pre-configured Teles-card, # An empty /etc/ppp/ioptions (for the new isdn4linux) and # the options for ipppd in /etc/ppp/options.ttyIx # # Here we set the variables: # DEVICE="ippp0" # Name of Device DEVNR="0" # Device-number MY_NUMBER="xxxxxxxx" # The local phonenumber MY_IP="10.10.10.10" # The local ip-adress DIALIN_IP="10.10.10.20" # Assigned ip-adress to dialer IPPPDCFG="/etc/ppp/options.ttyI0" # Options for ppp-daemon CARD_ID="teles_1" # If more than one card # Turn on debugging, 64 is full debugging /sbin/telesctrl $CARD_ID 1 64 echo "" echo "Configure device $DEVICE for dialin." echo "" /sbin/isdnctrl addif $DEVICE /sbin/isdnctrl eaz $DEVICE $MY_NUMBER /sbin/isdnctrl addphone $DEVICE in "*" /sbin/isdnctrl l2_prot $DEVICE hdlc /sbin/isdnctrl l3_prot $DEVICE trans /sbin/isdnctrl encap $DEVICE syncppp /sbin/isdnctrl secure $DEVICE off /sbin/isdnctrl huptimeout $DEVICE 600 # Hang's up after 10 minutes /sbin/ifconfig $DEVICE $MY_IP pointopoint $DIALIN_IP netmask 255.255.255.0 /sbin/route add -host $DIALIN_IP $DEVICE /sbin/isdnctrl pppbind $DEVICE $DEVNR echo "" echo "Interface options for $DEVICE are set...." echo "" # # Kick-off ipppd. Listens for incoming calls # Read options for ipppd from file # /sbin/ipppd /dev/$DEVICE file $IPPPDCFG & echo "....and ipppd loaded." echo "" # End of configuration script.