moved into main for pisi 2.0

This commit is contained in:
2015-07-04 15:10:56 +03:00
parent a421b3e735
commit 44aa282132
76 changed files with 10675 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#!/bin/sh
# 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
if [ "$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
# Recreate the default route so autodial works
[ -s /etc/conf.d/net ] && . /etc/conf.d/net
if [ -n "${gateway}" ] && [ "${gateway%/*}" = "$1" ]; then
/sbin/route add default dev ${gateway%/*}
fi
[ -f /etc/ppp/ip-down.local ] && . /etc/ppp/ip-down.local "$@"