summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-05-12 10:57:48 +0000
committerRoy Marples <uberlord@gentoo.org>2006-05-12 10:57:48 +0000
commitc9eab6c80d679a124161067bb84f60bc1f23c5a2 (patch)
treee303dbc5b2108e16302dbbc461176ad3be66518a /net-misc/openvpn
parentChanged SF cvs to new host, #133081. Tweaked depends a little. (diff)
downloadhistorical-c9eab6c80d679a124161067bb84f60bc1f23c5a2.tar.gz
historical-c9eab6c80d679a124161067bb84f60bc1f23c5a2.tar.bz2
historical-c9eab6c80d679a124161067bb84f60bc1f23c5a2.zip
up.sh and down.sh now save and restore resolv.conf if we don't
have resolvconf installed, #132932. Package-Manager: portage-2.1_pre10-r5
Diffstat (limited to 'net-misc/openvpn')
-rw-r--r--net-misc/openvpn/ChangeLog6
-rw-r--r--net-misc/openvpn/Manifest24
-rwxr-xr-xnet-misc/openvpn/files/down.sh11
-rwxr-xr-xnet-misc/openvpn/files/up.sh4
4 files changed, 30 insertions, 15 deletions
diff --git a/net-misc/openvpn/ChangeLog b/net-misc/openvpn/ChangeLog
index 140110b8fc08..1edacb26b50a 100644
--- a/net-misc/openvpn/ChangeLog
+++ b/net-misc/openvpn/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-misc/openvpn
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.86 2006/05/10 08:43:49 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.87 2006/05/12 10:57:48 uberlord Exp $
+
+ 12 May 2006; Roy Marples <uberlord@gentoo.org> files/down.sh, files/up.sh:
+ up.sh and down.sh now save and restore resolv.conf if we don't
+ have resolvconf installed, #132932.
10 May 2006; Roy Marples <uberlord@gentoo.org> openvpn-2.1_beta14.ebuild,
files/up.sh:
diff --git a/net-misc/openvpn/Manifest b/net-misc/openvpn/Manifest
index 98eef636c48d..56b456e91406 100644
--- a/net-misc/openvpn/Manifest
+++ b/net-misc/openvpn/Manifest
@@ -1,7 +1,7 @@
-AUX down.sh 603 RMD160 2c0dffef2ce46a77d6125d7e2b489c7447fe1fc8 SHA1 0001ab49f5b8b618c0671dcbf2c00741f65c142f SHA256 c88d1b493d8f77bc59d3d03663dba44a6a33458ddd5324db8b73c8342c24c82b size 603
-MD5 35e7dc5914068ae9eccb4a7f5ff7fdac files/down.sh 603
-RMD160 2c0dffef2ce46a77d6125d7e2b489c7447fe1fc8 files/down.sh 603
-SHA256 c88d1b493d8f77bc59d3d03663dba44a6a33458ddd5324db8b73c8342c24c82b files/down.sh 603
+AUX down.sh 862 RMD160 ff6b7a98a715d2e950d7de84338cf3247bace414 SHA1 149d7a2632a5f6bc85276d2ee5ab97254e033aff SHA256 384e5e2a78a04fc1e3ffc70e9e8b576777081ada1a639337ea6d5165f1853bf8 size 862
+MD5 053d23dd4afe2e040140d0afa78d9452 files/down.sh 862
+RMD160 ff6b7a98a715d2e950d7de84338cf3247bace414 files/down.sh 862
+SHA256 384e5e2a78a04fc1e3ffc70e9e8b576777081ada1a639337ea6d5165f1853bf8 files/down.sh 862
AUX openvpn-2.0.4-darwin.patch 717 RMD160 66aa5ea349329cf3e6089aa75eb7c80e0d21063b SHA1 ca21fbc61b78d893699b6bf4fb40eb2735db28c8 SHA256 ad70b77c10bb57a07af3d512e953fc8b5a07108df5bf9795e0cb12e1ba2b2136 size 717
MD5 9f0fcb64287dc55bb770ca86415e5cdd files/openvpn-2.0.4-darwin.patch 717
RMD160 66aa5ea349329cf3e6089aa75eb7c80e0d21063b files/openvpn-2.0.4-darwin.patch 717
@@ -14,10 +14,10 @@ AUX openvpn.init 1458 RMD160 38e1c7ef3197bbb5d9f7fc764f6ce5149387a4e6 SHA1 6b6ae
MD5 a66a9752a2dce48aa7061a535ef2ab4d files/openvpn.init 1458
RMD160 38e1c7ef3197bbb5d9f7fc764f6ce5149387a4e6 files/openvpn.init 1458
SHA256 54f33e766a455baeb5f8e1e318ad3be5fb0b88450ffad98f90812d64baef5e04 files/openvpn.init 1458
-AUX up.sh 1344 RMD160 98906cb98a60ba8f25dadd35772596f80f9842cb SHA1 1f78f02869f2b45617ad43d76f35efec1b2cb287 SHA256 31104383e1b4f490f4dea3edaf09e226896807283081b4a49fdd95009f6e0ca6 size 1344
-MD5 82c9c6be755b77806c327589d29fff9f files/up.sh 1344
-RMD160 98906cb98a60ba8f25dadd35772596f80f9842cb files/up.sh 1344
-SHA256 31104383e1b4f490f4dea3edaf09e226896807283081b4a49fdd95009f6e0ca6 files/up.sh 1344
+AUX up.sh 1477 RMD160 5d398f10b66a75447b227338ffdf03a16bf0fa16 SHA1 b5decc72a0ed6135f1b3bd59d76f9eda9e0abcfd SHA256 eca10ae245785fc0781da26826a15e9499337260d40417015ead148270dacbd2 size 1477
+MD5 d2f67510ae745e92ed2eb79580425c94 files/up.sh 1477
+RMD160 5d398f10b66a75447b227338ffdf03a16bf0fa16 files/up.sh 1477
+SHA256 eca10ae245785fc0781da26826a15e9499337260d40417015ead148270dacbd2 files/up.sh 1477
DIST openvpn-2.0.6.tar.gz 664816 RMD160 cf3cd807bb657baf317e896b57900958cf442a63 SHA256 1074c9fb5a7881e6d4ff0b125cf1e44a9fb650beef187f061785698522453003 size 664816
DIST openvpn-2.1_beta14.tar.gz 775042 RMD160 1c7845405b33153c1380aa48eaa88308a5eadd2c SHA256 da61d236047b9a5985765961930446a706aeef87dc2b4ce0f7e2c9f2831566ea size 775042
EBUILD openvpn-2.0.6.ebuild 3855 RMD160 8ea7fc436052eaedc29cab3d23a4786c64907214 SHA1 b89d1d8a5ad7d97644d042a1651d6d747678a006 SHA256 643a375dee682284d428aa84c25c8e2610e6e8b6c5e1f9a775dd8cf9cfadff89 size 3855
@@ -28,10 +28,10 @@ EBUILD openvpn-2.1_beta14.ebuild 4198 RMD160 ea68edb2496bb772d7e5248bdff7b507f59
MD5 732ac0e7ab0e5e61b682f18ab72a8855 openvpn-2.1_beta14.ebuild 4198
RMD160 ea68edb2496bb772d7e5248bdff7b507f59f04bc openvpn-2.1_beta14.ebuild 4198
SHA256 6906cd804695c03af240f9ee37091b940aa640cb01059304846493f564ca2c0a openvpn-2.1_beta14.ebuild 4198
-MISC ChangeLog 13313 RMD160 76f6360b92b07ad1f1cc2b477d74050cdf020e03 SHA1 23750cd42788999f2352de68832ab2b3829aa956 SHA256 47ffea3a05d60d5db126221270fbd46760d3b4bfebe37915c8e87a466a7ccb2d size 13313
-MD5 5b53d8b949d50ef11975d62406d36eea ChangeLog 13313
-RMD160 76f6360b92b07ad1f1cc2b477d74050cdf020e03 ChangeLog 13313
-SHA256 47ffea3a05d60d5db126221270fbd46760d3b4bfebe37915c8e87a466a7ccb2d ChangeLog 13313
+MISC ChangeLog 13494 RMD160 6dcbba6548f6a4c40e9b6505490eb7c736be13e1 SHA1 94e0d90b6cf5fe3d97f56eb3e2db9f584aa6066e SHA256 bc1a6c81f5a1c95937f307c000e6fbc6ee405921b79c2fd0e3aae96f03f4642b size 13494
+MD5 56bf56e50df18544e36c26abfa7b9a64 ChangeLog 13494
+RMD160 6dcbba6548f6a4c40e9b6505490eb7c736be13e1 ChangeLog 13494
+SHA256 bc1a6c81f5a1c95937f307c000e6fbc6ee405921b79c2fd0e3aae96f03f4642b ChangeLog 13494
MISC metadata.xml 440 RMD160 120089ec9c799161dfeeacd9a3adfc40b4317f06 SHA1 23d2975ef0f709dc2e754a5867942e679ee60740 SHA256 408ca4fc4f58fa21e629582d0a44a759f9695a018479d70efbd3338b6bdbcfd6 size 440
MD5 62aa0438042b29eba4a6afd971037761 metadata.xml 440
RMD160 120089ec9c799161dfeeacd9a3adfc40b4317f06 metadata.xml 440
diff --git a/net-misc/openvpn/files/down.sh b/net-misc/openvpn/files/down.sh
index 98a9104e8db6..321ca7bbfaa5 100755
--- a/net-misc/openvpn/files/down.sh
+++ b/net-misc/openvpn/files/down.sh
@@ -8,8 +8,15 @@ if [[ -x /etc/openvpn/"${SVCNAME}"-down.sh ]] ; then
( /etc/openvpn/"${SVCNAME}"-down.sh )
fi
-# Setup our resolv.conf
-[[ -x /sbin/resolvconf ]] && /sbin/resolvconf -d "${dev}"
+# Restore resolv.conf to how it was
+if [[ -x /sbin/resolvconf ]] ; then
+ /sbin/resolvconf -d "${dev}"
+elif [[ -e /etc/resolv.conf-"${dev}".sv ]] ; then
+ # Important that we copy instead of move incase resolv.conf is
+ # a symlink and not an actual file
+ cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf
+ rm -f /etc/resolv.conf-"${dev}".sv
+fi
# Re-enter the init script to start any dependant services
if /etc/init.d/"${SVCNAME}" --quiet status ; then
diff --git a/net-misc/openvpn/files/up.sh b/net-misc/openvpn/files/up.sh
index 7e6c0719d4aa..f950577532b7 100755
--- a/net-misc/openvpn/files/up.sh
+++ b/net-misc/openvpn/files/up.sh
@@ -19,6 +19,10 @@ if [[ -n ${DNS} ]] ; then
if [[ -x /sbin/resolvconf ]] ; then
echo -e "${DNS}" | /sbin/resolvconf -a "${dev}"
else
+ # Preserve the existing resolv.conf
+ if [[ -e /etc/resolv.conf ]] ; then
+ cp /etc/resolv.conf /etc/resolv.conf-"${dev}".sv
+ fi
echo -e "${DNS}" > /etc/resolv.conf
chmod 644 /etc/resolv.conf
fi