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/files | |
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/files')
-rw-r--r-- | net-misc/vpnc/files/vpnc-2.init | 14 |
1 files changed, 13 insertions, 1 deletions
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} |