/[gentoo-x86]/net-misc/openvpn/files/down.sh
Gentoo

Contents of /net-misc/openvpn/files/down.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download) (as text)
Wed Jan 30 15:05:26 2008 UTC (10 years, 3 months ago) by alonbl
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +6 -4 lines
File MIME type: text/x-sh
If SVCNAME does not exist avoid doing service magic
(Portage version: 2.1.4)

1 #!/bin/sh
2 # Copyright (c) 2006-2007 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # Contributed by Roy Marples (uberlord@gentoo.org)
5
6 # If we have a service specific script, run this now
7 if [ -x /etc/openvpn/"${SVCNAME}"-down.sh ] ; then
8 /etc/openvpn/"${SVCNAME}"-down.sh "$@"
9 fi
10
11 # Restore resolv.conf to how it was
12 if [ "${PEER_DNS}" != "no" ]; then
13 if [ -x /sbin/resolvconf ] ; then
14 /sbin/resolvconf -d "${dev}"
15 elif [ -e /etc/resolv.conf-"${dev}".sv ] ; then
16 # Important that we copy instead of move incase resolv.conf is
17 # a symlink and not an actual file
18 cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf
19 rm -f /etc/resolv.conf-"${dev}".sv
20 fi
21 fi
22
23 if [ -n "${SVCNAME}" ]; then
24 # Re-enter the init script to start any dependant services
25 if /etc/init.d/"${SVCNAME}" --quiet status ; then
26 export IN_BACKGROUND=true
27 /etc/init.d/"${SVCNAME}" --quiet stop
28 fi
29 fi
30
31 exit 0
32
33 # vim: ts=4 :

  ViewVC Help
Powered by ViewVC 1.1.20