blob: 0bac790932c2c58f77e4d3515e8a99c0d9716ae1 (
plain)
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
38
|
#!/bin/bash
# this is a script which is executed after disconnecting the ppp interface.
# look at man pppd for details
# the followings parameters are available:
# $1 = interface-name
# $2 = tty-device
# $3 = speed
# $4 = local-IP-address
# $5 = remote-IP-address
# $6 = ipparam
#Support for the new Gentoo baselayout
[ -f /sbin/functions.sh ] && source /sbin/functions.sh
if [ -x "${svclib}/net.modules.d/helpers.d/pppd-wrapper" ] &&
[ -x "/etc/init.d/net.$1" ] ; then
${svclib}/net.modules.d/helpers.d/pppd-wrapper down $1
elif [ "$USEPEERDNS" ]; then
# taken from debian's 0000usepeerdns
# follow any symlink to find the real file
REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)
if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then
# if an old resolv.conf file exists, restore it
if [ -e $REALRESOLVCONF.pppd-backup ]; then
mv $REALRESOLVCONF.pppd-backup $REALRESOLVCONF
fi
fi
fi
[ -f /etc/ppp/ip-down.local ] && . /etc/ppp/ip-down.local "$@"
|