File: netscript.ppp.ip-up

package info (click to toggle)
netscript-2.4 5.5.5%2Bnmu3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 460 kB
  • sloc: sh: 2,166; makefile: 86
file content (37 lines) | stat: -rwxr-xr-x 811 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
[ ! -x /bin/ip ] && exit 0
[ ! -x /usr/sbin/netscript ] && exit 0

qt () { "$@" >/dev/null 2>&1 ; }
vb () { "$@" ; }
source () { . $1 ; }
basename () { echo "${1##*/}"; }

. /etc/netscript/if.conf
. /etc/netscript/network.conf
. /etc/netscript/qos.conf

if [ -x /sbin/tc ]; then
	ip_QoSppp $PPP_IFACE
	ip_QoS $PPP_IFACE
fi

IF_NODASH=`echo "$PPP_IFACE" | sed -e 's/\-/_/g'`

eval TXQLEN=\${"${IF_NODASH}"_TXQLEN:-""}
[ -z "$TXQLEN" ] && eval TXQLEN=\${ppp_TXQLEN:-""}
[ -n "$TXQLEN" ] \
	&& ip link set dev $PPP_IFACE txqlen $TXQLEN


# Set up routes and ARP etc
qt () { "$@" >/dev/null 2>&1 ; }
if qt type ${PPP_IFACE}_network_ppp ; then
        ${PPP_IFACE}_network_ppp $PPP_IFACE
fi

eval PPP_CHAIN_AUTO=\"\${"${IF_NODASH}"_PPP_CHAIN_AUTO:-""}\"
for IF in $PPP_CHAIN_AUTO; do
    if_up $IF
done