#!/bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/circuits.ppp-i4l-server - PPP-over-ISDN4Linux (server side) # # Last Update: $Id$ #---------------------------------------------------------------------------- . /etc/rc.d/circuits-common.ppp-i4l # $1 = circuit information file # $2 = PPP peer file # $3 = variable receiving an error message (if any) ppp_isdn_server_circuit_add() { circuit_allocate_device ippp ippp_dev local ippp_unit=${ippp_dev#ippp} if [ $ippp_unit -ge $ISDN_PPP_MAX_CHANNELS ] then eval $3="\"Cannot use more than $ISDN_PPP_MAX_CHANNELS ISDN channels\"" return 1 fi do_modprobe ppp_async isdnctrl addif $ippp_dev ip link set dev $ippp_dev down ip link set dev $ippp_dev mtu $ISDN_PPP_MAX_NETIF_MTU case $circ_ppp_isdn_server_msn in '') ;; *) isdnctrl eaz $ippp_dev $circ_ppp_isdn_server_msn ;; esac local i for i in $circ_ppp_isdn_server_dialin do isdnctrl addphone $ippp_dev in $i done isdnctrl l2_prot $ippp_dev hdlc isdnctrl l3_prot $ippp_dev trans isdnctrl encap $ippp_dev syncppp isdnctrl huptimeout $ippp_dev 0 # hangup timeout is controlled by pppd isdnctrl dialmode $ippp_dev manual # dial mode is controlled by pppd isdnctrl chargehup $ippp_dev off if [ -n "$circ_ppp_isdn_server_dialin" ] then isdnctrl secure $ippp_dev on else isdnctrl secure $ippp_dev off fi local ippp_unit=${ippp_dev#ippp} isdnctrl pppbind $ippp_dev $ippp_unit : ${circ_ppp_mtu:=$ISDN_PPP_MTU} : ${circ_ppp_mru:=$ISDN_PPP_MTU} cat >> $1 <> $2 <> $1 <