/[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.5 - (hide annotations) (download) (as text)
Fri Feb 23 11:44:20 2007 UTC (11 years, 7 months ago) by uberlord
Branch: MAIN
Changes since 1.4: +1 -1 lines
File MIME type: text/x-sh
Init scripts no longer require bash.
(Portage version: 2.1.2-r10)

1 uberlord 1.4 #!/bin/sh
2 uberlord 1.5 # Copyright (c) 2006-2007 Gentoo Foundation
3 uberlord 1.1 # 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 uberlord 1.4 if [ -x /etc/openvpn/"${SVCNAME}"-down.sh ] ; then
8     /etc/openvpn/"${SVCNAME}"-down.sh
9 uberlord 1.1 fi
10    
11 uberlord 1.3 # Restore resolv.conf to how it was
12 uberlord 1.4 if [ -x /sbin/resolvconf ] ; then
13 uberlord 1.3 /sbin/resolvconf -d "${dev}"
14 uberlord 1.4 elif [ -e /etc/resolv.conf-"${dev}".sv ] ; then
15 uberlord 1.3 # Important that we copy instead of move incase resolv.conf is
16     # a symlink and not an actual file
17     cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf
18     rm -f /etc/resolv.conf-"${dev}".sv
19     fi
20 uberlord 1.1
21     # Re-enter the init script to start any dependant services
22     if /etc/init.d/"${SVCNAME}" --quiet status ; then
23     export IN_BACKGROUND=true
24     /etc/init.d/"${SVCNAME}" --quiet stop
25     fi
26    
27     exit 0
28    
29     # vim: ts=4 :

  ViewVC Help
Powered by ViewVC 1.1.20