diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2008-01-30 15:05:26 +0000 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2008-01-30 15:05:26 +0000 |
commit | 4495a75402ad0b7f9a4225affbc6527ff0828a97 (patch) | |
tree | 19a32a78cf4a2e439f1f462e5f78158e7e0d1b62 /net-misc | |
parent | Version bump, remove old (diff) | |
download | gentoo-2-4495a75402ad0b7f9a4225affbc6527ff0828a97.tar.gz gentoo-2-4495a75402ad0b7f9a4225affbc6527ff0828a97.tar.bz2 gentoo-2-4495a75402ad0b7f9a4225affbc6527ff0828a97.zip |
If SVCNAME does not exist avoid doing service magic
(Portage version: 2.1.4)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/openvpn/ChangeLog | 5 | ||||
-rwxr-xr-x | net-misc/openvpn/files/down.sh | 10 | ||||
-rwxr-xr-x | net-misc/openvpn/files/up.sh | 18 |
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 |