diff options
author | Alin Năstac <mrness@gentoo.org> | 2005-11-29 17:27:01 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2005-11-29 17:27:01 +0000 |
commit | bc027855868b2fd7af8dfe324603850a228a3bd1 (patch) | |
tree | e63c36af6b48069afbe8250d0e91cec2bc3c7c85 /net-dialup/ppp/files | |
parent | version bump - ebuild submitted by Steve Carlson via bug #113871 (diff) | |
download | gentoo-2-bc027855868b2fd7af8dfe324603850a228a3bd1.tar.gz gentoo-2-bc027855868b2fd7af8dfe324603850a228a3bd1.tar.bz2 gentoo-2-bc027855868b2fd7af8dfe324603850a228a3bd1.zip |
remove old versions; add support for the new pppd net module introduced by sys-apps/baselayout-1.12.0_pre11
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'net-dialup/ppp/files')
-rw-r--r-- | net-dialup/ppp/files/digest-ppp-2.4.2-r12 | 4 | ||||
-rw-r--r-- | net-dialup/ppp/files/digest-ppp-2.4.3-r10 (renamed from net-dialup/ppp/files/digest-ppp-2.4.3-r8) | 2 | ||||
-rw-r--r-- | net-dialup/ppp/files/ip-down.baselayout | 38 | ||||
-rw-r--r-- | net-dialup/ppp/files/ip-up.baselayout | 49 |
4 files changed, 88 insertions, 5 deletions
diff --git a/net-dialup/ppp/files/digest-ppp-2.4.2-r12 b/net-dialup/ppp/files/digest-ppp-2.4.2-r12 deleted file mode 100644 index 1f2afa2ee484..000000000000 --- a/net-dialup/ppp/files/digest-ppp-2.4.2-r12 +++ /dev/null @@ -1,4 +0,0 @@ -MD5 362bcf218fba8afbb9afbee7471e5dac ppp-2.4.2.tar.gz 774441 -MD5 760e970cad38d42766c72341f175604d ppp-2.4.2-patches-20050514.tar.gz 11707 -MD5 0d2679907627f68dd6a2c32d1c7dda90 ppp-2.4.2-mppe-mppc-1.1.patch.gz 12532 -MD5 9d2f3febf510c5b0cbb4dacba713a217 ppp-dhcpc.tgz 33497 diff --git a/net-dialup/ppp/files/digest-ppp-2.4.3-r8 b/net-dialup/ppp/files/digest-ppp-2.4.3-r10 index 0216e73081c0..2fdf48d49e0d 100644 --- a/net-dialup/ppp/files/digest-ppp-2.4.3-r8 +++ b/net-dialup/ppp/files/digest-ppp-2.4.3-r10 @@ -1,3 +1,3 @@ MD5 848f6c3cafeb6074ffeb293c3af79b7c ppp-2.4.3.tar.gz 688092 -MD5 0e4ebd831eb7e2a8fb1c057078b3e30a ppp-2.4.3-patches-20050729.tar.gz 33442 +MD5 409bf412f967694e64363af4f020a07b ppp-2.4.3-patches-20051105.tar.gz 54784 MD5 9d2f3febf510c5b0cbb4dacba713a217 ppp-dhcpc.tgz 33497 diff --git a/net-dialup/ppp/files/ip-down.baselayout b/net-dialup/ppp/files/ip-down.baselayout new file mode 100644 index 000000000000..0bac790932c2 --- /dev/null +++ b/net-dialup/ppp/files/ip-down.baselayout @@ -0,0 +1,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 "$@" diff --git a/net-dialup/ppp/files/ip-up.baselayout b/net-dialup/ppp/files/ip-up.baselayout new file mode 100644 index 000000000000..c3792f998f0e --- /dev/null +++ b/net-dialup/ppp/files/ip-up.baselayout @@ -0,0 +1,49 @@ +#!/bin/bash + +# this is a script which is executed after connecting 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 up $1 + +elif [ "$USEPEERDNS" ]; then + + # add the server supplied DNS entries to /etc/resolv.conf + # (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 + + # merge the new nameservers with the other options from the old configuration + { + grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF + cat /etc/ppp/resolv.conf + } > $REALRESOLVCONF.tmp + + # backup the old configuration and install the new one + cp -dpP $REALRESOLVCONF $REALRESOLVCONF.pppd-backup + mv $REALRESOLVCONF.tmp $REALRESOLVCONF + + # correct permissions + chmod 0644 /etc/resolv.conf + chown root:root /etc/resolv.conf + + fi + +fi + +[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local "$@" |