aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorChris Kankiewicz <chris@chriskankiewicz.com>2016-01-20 14:16:58 -0700
committerNatanael Copa <ncopa@alpinelinux.org>2016-01-26 21:53:54 +0000
commitbfdc08d49cfd221709ce29ad6f81a651461c71e2 (patch)
tree3ffcb078644bdb440e700ea373c2e2f21b1eb9f4 /main
parentd312648c4ac76e655f817783860fe16c370d8e88 (diff)
downloadaports-bfdc08d49cfd221709ce29ad6f81a651461c71e2.tar.bz2
aports-bfdc08d49cfd221709ce29ad6f81a651461c71e2.tar.xz
main/openvpn: fix down script not restoring original resolv.conf
This patch fixes an error where, in the provided OpenVPN down script, the cp command would fail due to the resolv.conf file already existing. Instead of using cp we cat the file contents over the exising resolv.conf file to avoid the error and preserve any symlinks that may exist. Fixes issue #5027
Diffstat (limited to 'main')
-rw-r--r--main/openvpn/APKBUILD8
-rw-r--r--main/openvpn/openvpn.down4
2 files changed, 6 insertions, 6 deletions
diff --git a/main/openvpn/APKBUILD b/main/openvpn/APKBUILD
index c3a66951a0..9244f81b2c 100644
--- a/main/openvpn/APKBUILD
+++ b/main/openvpn/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openvpn
pkgver=2.3.10
-pkgrel=0
+pkgrel=1
pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)"
url="http://openvpn.sourceforge.net/"
arch="all"
@@ -77,14 +77,14 @@ md5sums="275a640ccfc6a9f9a8faa4c84a74d294 openvpn-2.3.10.tar.gz
5098518a5749197148132593072e1b3b openvpn.initd
9eca88cac6294027ec1bb7be74185c3a openvpn.confd
dc72fecd1a1bcef937603057cd6574b1 openvpn.up
-dc3ff0bae442b9aedd947b8ffda1687a openvpn.down"
+4e9e45e1041ac6708c090af3468cb79d openvpn.down"
sha256sums="f8b0b5b92e35bbca1db1a7e6b49e04639e45634e9accd460459b40b2c99ec8f6 openvpn-2.3.10.tar.gz
fcb9f5e224dc3e73fddf537a15dd9c3c018002d499fa6a4680e747f42bb99609 openvpn.initd
330149a83684ddabe413d134d4c8efad4c88b18c2ab67165014deff5f7fffad2 openvpn.confd
848da0929c37b2112769232fbbdf61961b6107c6726d4b74d1ceb034b39ad5dd openvpn.up
-39debebcd8c899f20e6d355cbc8eaab46e28b83a9f6c33a94c065688a4f3d2c7 openvpn.down"
+972a368b57daf60e3a679e3c80dd9a0cba15d0c66421e4218967d83dcddd9c80 openvpn.down"
sha512sums="13f7cfb8e5a7485f930d13830691a937da40b4cc881c403ab613132cb94aba0a30b1727debdfa1b8d7d761b447ccbcf0d1c2d56ca82f6a6ce7e2eec9642fd13f openvpn-2.3.10.tar.gz
8a4080b7784faa156aa0775f7b73fe5c054707270af2a3139150629450ad0f1f5954dce5fc850f1bfd7b93bcc47ed4bc9b22159c536874698c78d81ba99338a7 openvpn.initd
982ade883afbe2e656a9cbbe36c31c0e8b4f7bbbe5b63df9f7b834f02a9153032fb7445c85d3e91f62c68a7ddd13c3afbf420fb71cdd13d9c4b69f867bdd9f37 openvpn.confd
f904d6125ed1ddb48ea632c3b290a7a4a7a7436be0d46b323fc8c92f919f9d076fdc78ff7bed0dd65675f0bc3559e531e372b805fc11ef287efeeb4d54fe52f4 openvpn.up
-5defd61edf11cc63f3f8f60bef7fa730c4bcdd2545d664bd94666dd3aea80bd9d190263d8835a555e4287a594f6fce0f52426aed49c60233ff637a2a6164a997 openvpn.down"
+8f2889dc92b57deaea15970945ac8b1bacdfa660e2a74ce13acaf6f9b431823fec82cdc7d942d0bacd1f54edf727c7c240a6eb8f7d0c745bc52838535c37c901 openvpn.down"
diff --git a/main/openvpn/openvpn.down b/main/openvpn/openvpn.down
index 1c70db0ec6..ad8910e8f3 100644
--- a/main/openvpn/openvpn.down
+++ b/main/openvpn/openvpn.down
@@ -13,9 +13,9 @@ if [ "${PEER_DNS}" != "no" ]; then
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
+ # Important that we cat instead of move incase resolv.conf is
# a symlink and not an actual file
- cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf
+ cat /etc/resolv.conf-"${dev}".sv > /etc/resolv.conf
rm -f /etc/resolv.conf-"${dev}".sv
fi
fi