summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-06-06 18:44:40 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-06-06 18:44:40 +0000
commit685c2d29d0f78353181768452b8b990ae17b3c73 (patch)
tree20b5fbfe89d01072aa036f983e0177362ab7c7bf /net-dns/opendnssec/files
parentGoodbye kdeprefix (part 1 -- die on +kdeprefix) (diff)
downloadgentoo-2-685c2d29d0f78353181768452b8b990ae17b3c73.tar.gz
gentoo-2-685c2d29d0f78353181768452b8b990ae17b3c73.tar.bz2
gentoo-2-685c2d29d0f78353181768452b8b990ae17b3c73.zip
Improve the initscript to die on certain occasions. Rerun the pkg_pretend phase as the variables are not ensured to be saved.
(Portage version: 2.2.0_alpha37/cvs/Linux x86_64)
Diffstat (limited to 'net-dns/opendnssec/files')
-rw-r--r--net-dns/opendnssec/files/opendnssec.confd4
-rw-r--r--net-dns/opendnssec/files/opendnssec.initd41
2 files changed, 37 insertions, 8 deletions
diff --git a/net-dns/opendnssec/files/opendnssec.confd b/net-dns/opendnssec/files/opendnssec.confd
index d019e280cf70..88a7f2499fb1 100644
--- a/net-dns/opendnssec/files/opendnssec.confd
+++ b/net-dns/opendnssec/files/opendnssec.confd
@@ -1,12 +1,12 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/files/opendnssec.confd,v 1.1 2011/06/02 12:26:27 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/files/opendnssec.confd,v 1.2 2011/06/06 18:44:40 scarabeus Exp $
# Variables containing default binaries used in the opendnssec
# initscript. You can alter them to another applications/paths
# if required.
-CHECKCONF_BIN=/usr/bin/ods-kaspcheck
+CHECKCONFIG_BIN=/usr/bin/ods-kaspcheck
CONTROL_BIN=/usr/sbin/ods-control
ENFORCER_BIN=/usr/sbin/ods-enforcerd
SIGNER_BIN=/usr/sbin/ods-signerd
diff --git a/net-dns/opendnssec/files/opendnssec.initd b/net-dns/opendnssec/files/opendnssec.initd
index 8b14ac2333ff..1f63aa09bd82 100644
--- a/net-dns/opendnssec/files/opendnssec.initd
+++ b/net-dns/opendnssec/files/opendnssec.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/files/opendnssec.initd,v 1.1 2011/06/02 12:26:27 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/files/opendnssec.initd,v 1.2 2011/06/06 18:44:40 scarabeus Exp $
description="An open-source turn-key solution for DNSSEC"
@@ -23,16 +23,23 @@ checkconfig() {
fi
return $errors
fi
+ eerror "Unable to execute ${CHECKCONFIG_BIN:-config binary}"
# can't validate config, just die
return 1
}
start_enforcer() {
- if [ -x "${ENFORCER_BIN}" ]; then
+ if [ -n "${ENFORCER_BIN}" ] && [ -x "${ENFORCER_BIN}" ]; then
ebegin "Starting OpenDNSSEC Enforcer"
${CONTROL_BIN} enforcer start > /dev/null
eend $?
+ else
+ if [ -n "${ENFORCER_BIN}" ]; then
+ eerror "OpenDNSSEC Enforcer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Enforcer not used."
fi
}
@@ -45,10 +52,16 @@ stop_enforcer() {
}
start_signer() {
- if [ -x "${SIGNER_BIN}" ]; then
+ if [ -n "${SIGNER_BIN}" ] && [ -x "${SIGNER_BIN}" ]; then
ebegin "Starting OpenDNSSEC Signer"
${CONTROL_BIN} signer start > /dev/null 2>&1
eend $?
+ else
+ if [ -n "${SIGNER_BIN}" ]; then
+ eerror "OpenDNSSEC Signer binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Signer not used."
fi
}
@@ -61,17 +74,33 @@ stop_signer() {
}
start_eppclient() {
- if [ -x "${EPPCLIENT_BIN}" ]; then
+ if [ -n "${EPPCLIENT_BIN}" ] && [ -x "${EPPCLIENT_BIN}" ]; then
ebegin "Starting OpenDNSSEC Eppclient"
- start-stop-daemon --start --user opendnssec --group opendnssec --exec "${EPPCLIENT_BIN}" --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
+ start-stop-daemon \
+ --start \
+ --user opendnssec --group opendnssec \
+ --exec "${EPPCLIENT_BIN}" \
+ --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
eend $?
+ else
+ # eppclient is ofptional so if we use the default binary and it
+ # is not used we won't die
+ if [ -n "${EPPCLIENT_BIN}" ] && \
+ [ "${EPPCLIENT_BIN}" != "/usr/sbin/eppclientd" ]; then
+ eerror "OpenDNSSEC Eppclient binary not executable"
+ return 1
+ fi
+ einfo "OpenDNSSEC Eppclient not used."
fi
}
stop_eppclient() {
if [ -x "${EPPCLIENT_BIN}" ]; then
ebegin "Stopping OpenDNSSEC Eppclient"
- start-stop-daemon --stop --exec "${EPPCLIENT_BIN}" --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
+ start-stop-daemon \
+ --stop \
+ --exec "${EPPCLIENT_BIN}" \
+ --pidfile "${EPPCLIENT_PIDFILE}" > /dev/null
eend $?
fi
}