#!/bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/circuits.ppp-i4l - PPP over ISDN4Linux (client 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_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 # by default, wait at most 15 seconds until the ISDN line is connected local circ_ppp_isdn_timeout=${circ_ppp_isdn_timeout:-15} # the command that pppd shall execute local ippp_cmd="exec /usr/sbin/ppp2i4l -d $circ_debug -l local2 -t $circ_ppp_isdn_timeout /dev/$ippp_dev $ippp_dev" 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_msn in '') ;; *) isdnctrl eaz $ippp_dev $circ_ppp_isdn_msn ;; esac local i for i in $circ_ppp_isdn_dialout do isdnctrl addphone $ippp_dev out $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 isdnctrl secure $ippp_dev on isdnctrl pppbind $ippp_dev $ippp_unit : ${circ_ppp_mtu:=$ISDN_PPP_MTU} : ${circ_ppp_mru:=$ISDN_PPP_MTU} ppp_disconnect="exec /sbin/isdnctrl hangup $ippp_dev" # A/C compression _must_ be prohibited as the ISDN subsystem needs # these fields to work correctly # # "sync" is not activated to not risk lost frames due to unwanted merging cat >> $2 <> $1 <