diff options
author | Christian Faulhammer <opfer@gentoo.org> | 2008-04-04 06:32:53 +0000 |
---|---|---|
committer | Christian Faulhammer <opfer@gentoo.org> | 2008-04-04 06:32:53 +0000 |
commit | 436035f954582d264358d76b3843a56e7281160a (patch) | |
tree | f130091a76ac19bbd7bfa6d2b672de9cbdb4a0c7 /net-misc/vpnc | |
parent | only mask net-misc/ltsp below version 5 (diff) | |
download | gentoo-2-436035f954582d264358d76b3843a56e7281160a.tar.gz gentoo-2-436035f954582d264358d76b3843a56e7281160a.tar.bz2 gentoo-2-436035f954582d264358d76b3843a56e7281160a.zip |
update init script so it fails on vpnc startup error, pointed out by Tiziano Müller <dev-zero AT g.o> in bug 216042
(Portage version: 2.1.4.4)
Diffstat (limited to 'net-misc/vpnc')
-rw-r--r-- | net-misc/vpnc/ChangeLog | 6 | ||||
-rw-r--r-- | net-misc/vpnc/files/vpnc-2.init | 14 |
2 files changed, 18 insertions, 2 deletions
diff --git a/net-misc/vpnc/ChangeLog b/net-misc/vpnc/ChangeLog index 8bb90bf3e1a7..7925d17062bf 100644 --- a/net-misc/vpnc/ChangeLog +++ b/net-misc/vpnc/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-misc/vpnc # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/ChangeLog,v 1.66 2008/02/07 08:09:13 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/ChangeLog,v 1.67 2008/04/04 06:32:53 opfer Exp $ + + 04 Apr 2008; Christian Faulhammer <opfer@gentoo.org> files/vpnc-2.init: + update init script so it fails on vpnc startup error, pointed out by Tiziano + Müller <dev-zero AT g.o> in bug 216042 07 Feb 2008; Christian Faulhammer <opfer@gentoo.org> -files/vpnc-1.init, -vpnc-0.5.1.ebuild: diff --git a/net-misc/vpnc/files/vpnc-2.init b/net-misc/vpnc/files/vpnc-2.init index 0beb63e81584..af5a961e8f1a 100644 --- a/net-misc/vpnc/files/vpnc-2.init +++ b/net-misc/vpnc/files/vpnc-2.init @@ -2,7 +2,7 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/files/vpnc-2.init,v 1.1 2008/01/07 07:26:23 opfer Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/vpnc/files/vpnc-2.init,v 1.2 2008/04/04 06:32:53 opfer Exp $ VPNDIR="/etc/vpnc" VPN="${SVCNAME#*.}" @@ -65,6 +65,12 @@ start() { start-stop-daemon --start --pidfile "${VPNPID}" --exec /usr/sbin/vpnc \ -- --pid-file "${VPNPID}" "${VPNCONF}" > ${SCREEN_OUTPUT} + local retval=$? + if [ ! ${retval} -eq 0 ]; then + eend ${retval} + return ${retval} + fi + if [ -x "${POSTUPSCRIPT}" ] ; then "${POSTUPSCRIPT}" > ${SCREEN_OUTPUT} fi @@ -79,6 +85,12 @@ stop() { fi start-stop-daemon --stop --exec /usr/sbin/vpnc --pidfile "${VPNPID}" + local retval=$? + if [ ! ${retval} -eq 0 ]; then + eend ${retval} + return ${retval} + fi + if [ -x "${POSTDOWNSCRIPT}" ] ; then "${POSTDOWNSCRIPT}" > ${SCREEN_OUTPUT} |