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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20