/[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.3 Revision 1.4
1#!/bin/bash 1#!/bin/sh
2# Copyright (c) 2006 Gentoo Foundation 2# Copyright (c) 2006 Gentoo Foundation
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 [[ -x /sbin/resolvconf ]] ; then 12if [ -x /sbin/resolvconf ] ; then
13 /sbin/resolvconf -d "${dev}" 13 /sbin/resolvconf -d "${dev}"
14elif [[ -e /etc/resolv.conf-"${dev}".sv ]] ; then 14elif [ -e /etc/resolv.conf-"${dev}".sv ] ; then
15 # Important that we copy instead of move incase resolv.conf is 15 # Important that we copy instead of move incase resolv.conf is
16 # a symlink and not an actual file 16 # a symlink and not an actual file
17 cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf 17 cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf
18 rm -f /etc/resolv.conf-"${dev}".sv 18 rm -f /etc/resolv.conf-"${dev}".sv
19fi 19fi

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20