diff options
author | Heinrich Wendel <lanius@gentoo.org> | 2004-01-17 18:41:47 +0000 |
---|---|---|
committer | Heinrich Wendel <lanius@gentoo.org> | 2004-01-17 18:41:47 +0000 |
commit | 82f54caeddb71c416252787aedc11db5e129cb92 (patch) | |
tree | db4fb8ec2952403a0c3f0d883ba9aeb5b0a52873 /net-dialup | |
parent | remove orphaned files (diff) | |
download | historical-82f54caeddb71c416252787aedc11db5e129cb92.tar.gz historical-82f54caeddb71c416252787aedc11db5e129cb92.tar.bz2 historical-82f54caeddb71c416252787aedc11db5e129cb92.zip |
resolv.conf permissions again, took method from debian
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/ppp/ChangeLog | 6 | ||||
-rw-r--r-- | net-dialup/ppp/Manifest | 14 | ||||
-rw-r--r-- | net-dialup/ppp/files/2.4.2b3/ip-down | 16 | ||||
-rw-r--r-- | net-dialup/ppp/files/2.4.2b3/ip-up | 22 |
4 files changed, 44 insertions, 14 deletions
diff --git a/net-dialup/ppp/ChangeLog b/net-dialup/ppp/ChangeLog index 5c86243dfa55..147ffd0d3afd 100644 --- a/net-dialup/ppp/ChangeLog +++ b/net-dialup/ppp/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-dialup/ppp # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.44 2004/01/12 14:48:20 lanius Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/ppp/ChangeLog,v 1.45 2004/01/17 18:41:33 lanius Exp $ + + 17 Jan 2004; Heinrich Wendel <lanius@gentoo.org> files/2.4.2b3/ip-down, + files/2.4.2b3/ip-up: + resolv.conf permissions again, took method from debian 12 Jan 2004; Heinrich Wendel <lanius@gentoo.org> files/2.4.2b3/ip-down, files/2.4.2b3/ip-up: diff --git a/net-dialup/ppp/Manifest b/net-dialup/ppp/Manifest index 2072f037235c..86db92976681 100644 --- a/net-dialup/ppp/Manifest +++ b/net-dialup/ppp/Manifest @@ -1,14 +1,17 @@ MD5 189de8d4703c6e1e072e147077c7d720 ppp-2.4.2_beta3-r1.ebuild 3575 +MD5 7226a185b85b8dd36ce1eefb89ec2505 ppp-2.4.1-r14.ebuild 4617 +MD5 50299c59e201565d030e508e386e63ae ChangeLog 8142 +MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 MD5 4e62cdeb360ca0a22becbd2deb6f2dac files/pon 957 MD5 86cdaf133f7a79fb464f02d83afc7734 files/plog 146 MD5 05b7394b35a2342033b52134568bf6b8 files/poff 2723 -MD5 5f6f3203688bc5a2eceef8301f482c9f files/chat-default 344 +MD5 03eb44456283c43760269a92083946d3 files/chat-default 345 MD5 824964465508977f9d0836f029d6b02f files/ppp-2.4.1-openssl-0.9.6-mppe-patch.gz 36112 MD5 47bae70427ec4cb3ea1cc87ae799d0e3 files/gcc33-amd64.patch 1207 MD5 c74b7e519f593babcfc3821832d72819 files/ip-up 282 MD5 44cc662ba9aa61dd9add3ddd4c5ded57 files/pon.1 3607 MD5 feb6723fa9b971cb443cff79693db0cd files/ppp-crypto-fix.patch.bz2 35770 -MD5 271b9ea36d7e7c5c6587036927d604e6 files/confd.ppp0 3309 +MD5 208e12ddd9a3e4c4ac470e9c4d7d7144 files/confd.ppp0 3310 MD5 4fda43c2f3f8b5b58a58e5d238991c0b files/digest-ppp-2.4.1-r14 65 MD5 f82a3ae0dba4ce6031bbf1405071e827 files/ppp-2.4.1-r10.patch 311 MD5 b783e9bd9ac5956c582499f0623195fe files/net.ppp0 4705 @@ -20,7 +23,7 @@ MD5 0713ffc9ae6e3ee4ef0f5c3cb752b3ea files/ip-down 285 MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/pppoe.html 7605 MD5 2890b47660f967a07ac5b211850e46c5 files/2.4.2b3/options-pptp 238 MD5 7004513b8b14aad3e2f598535e672af4 files/2.4.2b3/chat-default 351 -MD5 13987048e5fadd25a457a7afed99e027 files/2.4.2b3/ip-up 731 +MD5 7fd76d97cb9a07a6b23b3ab7a0c5cc2c files/2.4.2b3/ip-up 1168 MD5 1c6a75aa9390438f483e2885ea40ca72 files/2.4.2b3/killaddr-smarter.patch 6225 MD5 12500a756925e9d8f4b2b655e95a2541 files/2.4.2b3/confd.ppp0 2784 MD5 fa2a5b8df496922fa2fb592115953b6b files/2.4.2b3/options-pppoe 53 @@ -28,9 +31,6 @@ MD5 bf0ee7e6765e3b18dbe3964be6cd4500 files/2.4.2b3/mpls.patch 10506 MD5 acb0f867e42e9a380eaf8e1c312ad63b files/2.4.2b3/net.ppp0 4343 MD5 1fd88dda7f4996799c69a9501d42cc23 files/2.4.2b3/README.mpls 530 MD5 5d83af7b897082a0b1ecd70a2cc2a0c7 files/2.4.2b3/modules.ppp 268 -MD5 c0b2040eac62ae84285ae9456681f8da files/2.4.2b3/ip-down 664 +MD5 cb8bde7fab636f046c94e7aa52234ef2 files/2.4.2b3/ip-down 914 MD5 f0ad3e0c62aec1771536caf00e28b9c6 files/2.4.2b3/pppoe.html 7605 MD5 0e16e7bb8ae71505e719fe5471bd2097 files/2.4.2b3/cflags.patch 3403 -MD5 7226a185b85b8dd36ce1eefb89ec2505 ppp-2.4.1-r14.ebuild 4617 -MD5 8123dde18e6ae94b644b14ec588f35f4 ChangeLog 7987 -MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163 diff --git a/net-dialup/ppp/files/2.4.2b3/ip-down b/net-dialup/ppp/files/2.4.2b3/ip-down index 86b748dfbecf..1bf78c318963 100644 --- a/net-dialup/ppp/files/2.4.2b3/ip-down +++ b/net-dialup/ppp/files/2.4.2b3/ip-down @@ -13,12 +13,22 @@ if [ "$USEPEERDNS" ]; then - # restore original /etc/resolv.conf - /bin/mv -f /etc/resolv.conf.old /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 + + # if an old resolv.conf file exists, restore it + if [ -e $REALRESOLVCONF.pppd-backup ]; then + mv $REALRESOLVCONF.pppd-backup $REALRESOLVCONF + fi # Change perms because it b0rked kppp /bin/chmod 640 /etc/resolv.conf - /bin/chown --no-dereference root:users /etc/resolv.conf + /bin/chown root:users /etc/resolv.conf + + fi fi diff --git a/net-dialup/ppp/files/2.4.2b3/ip-up b/net-dialup/ppp/files/2.4.2b3/ip-up index c280726fb0de..fb7e20788706 100644 --- a/net-dialup/ppp/files/2.4.2b3/ip-up +++ b/net-dialup/ppp/files/2.4.2b3/ip-up @@ -14,12 +14,28 @@ if [ "$USEPEERDNS" ]; then # add the server supplied DNS entries to /etc/resolv.conf - /bin/cp -f /etc/resolv.conf /etc/resolv.conf.old - /bin/cat /etc/ppp/resolv.conf >> /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 -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup + mv $REALRESOLVCONF.tmp $REALRESOLVCONF # Change perms because it b0rked kppp /bin/chmod 640 /etc/resolv.conf - /bin/chown --no-dereference root:users /etc/resolv.conf + /bin/chown root:users /etc/resolv.conf + + fi fi |