diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2011-06-04 14:33:13 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2011-06-04 14:41:13 +0000 |
commit | f80c232c3e5f32cd904117a1d91273b8887d17e2 (patch) | |
tree | 19d79f1a862aae8d76e7ed348ac26bec241ec4b3 /main/openvpn/openvpn.down | |
parent | 21bbd56f158e6be27059a8543aa133fbb50bf047 (diff) | |
download | aports-f80c232c3e5f32cd904117a1d91273b8887d17e2.tar.bz2 aports-f80c232c3e5f32cd904117a1d91273b8887d17e2.tar.xz |
main/openvpn: multiple changes like ipv6 and new initd
added ipv6 patch from: http://www.greenie.net/ipv6/openvpn.html
move easy-rsa into subpkg and depend on openssl
update init.d and conf.d from latest gentoo release
added up/down scripts from latest gentoo release
ref #618
Diffstat (limited to 'main/openvpn/openvpn.down')
-rw-r--r-- | main/openvpn/openvpn.down | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/main/openvpn/openvpn.down b/main/openvpn/openvpn.down new file mode 100644 index 0000000000..1c70db0ec6 --- /dev/null +++ b/main/openvpn/openvpn.down @@ -0,0 +1,33 @@ +#!/bin/sh +# Copyright (c) 2006-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Contributed by Roy Marples (uberlord@gentoo.org) + +# If we have a service specific script, run this now +if [ -x /etc/openvpn/"${SVCNAME}"-down.sh ] ; then + /etc/openvpn/"${SVCNAME}"-down.sh "$@" +fi + +# Restore resolv.conf to how it was +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 + # a symlink and not an actual file + cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf + rm -f /etc/resolv.conf-"${dev}".sv + fi +fi + +if [ -n "${SVCNAME}" ]; then + # Re-enter the init script to start any dependant services + if /etc/init.d/"${SVCNAME}" --quiet status ; then + export IN_BACKGROUND=true + /etc/init.d/"${SVCNAME}" --quiet stop + fi +fi + +exit 0 + +# vim: ts=4 : |