summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/openvpn/ChangeLog5
-rwxr-xr-xnet-misc/openvpn/files/down.sh10
-rwxr-xr-xnet-misc/openvpn/files/up.sh18
3 files changed, 20 insertions, 13 deletions
diff --git a/net-misc/openvpn/ChangeLog b/net-misc/openvpn/ChangeLog
index b1932e33cdcf..76aae27198aa 100644
--- a/net-misc/openvpn/ChangeLog
+++ b/net-misc/openvpn/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-misc/openvpn
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.122 2008/01/29 15:07:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.123 2008/01/30 15:05:25 alonbl Exp $
+
+ 30 Jan 2008; Alon Bar-Lev <alonbl@gentoo.org> files/down.sh, files/up.sh:
+ If SVCNAME does not exist avoid doing service magic
29 Jan 2008; Diego Pettenò <flameeyes@gentoo.org> files/openvpn-2.1.init,
files/openvpn.init:
diff --git a/net-misc/openvpn/files/down.sh b/net-misc/openvpn/files/down.sh
index 1c5885311b39..1c70db0ec653 100755
--- a/net-misc/openvpn/files/down.sh
+++ b/net-misc/openvpn/files/down.sh
@@ -20,10 +20,12 @@ if [ "${PEER_DNS}" != "no" ]; then
fi
fi
-# 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
+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
diff --git a/net-misc/openvpn/files/up.sh b/net-misc/openvpn/files/up.sh
index ae28712feb63..d0879b83c08d 100755
--- a/net-misc/openvpn/files/up.sh
+++ b/net-misc/openvpn/files/up.sh
@@ -64,15 +64,17 @@ fi
# Quick summary - our init scripts are re-entrant and set the SVCNAME env var
# as we could have >1 openvpn service
-# If we have a service specific script, run this now
-if [ -x /etc/openvpn/"${SVCNAME}"-up.sh ] ; then
- /etc/openvpn/"${SVCNAME}"-up.sh "$@"
-fi
+if [ -n "${SVCNAME}" ]; then
+ # If we have a service specific script, run this now
+ if [ -x /etc/openvpn/"${SVCNAME}"-up.sh ] ; then
+ /etc/openvpn/"${SVCNAME}"-up.sh "$@"
+ fi
-# 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 start
+ # 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 start
+ fi
fi
exit 0