diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2011-06-06 18:44:40 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2011-06-06 18:44:40 +0000 |
commit | 685c2d29d0f78353181768452b8b990ae17b3c73 (patch) | |
tree | 20b5fbfe89d01072aa036f983e0177362ab7c7bf /net-dns | |
parent | Goodbye kdeprefix (part 1 -- die on +kdeprefix) (diff) | |
download | gentoo-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')
-rw-r--r-- | net-dns/opendnssec/ChangeLog | 10 | ||||
-rw-r--r-- | net-dns/opendnssec/files/opendnssec.confd | 4 | ||||
-rw-r--r-- | net-dns/opendnssec/files/opendnssec.initd | 41 | ||||
-rw-r--r-- | net-dns/opendnssec/opendnssec-1.3.0_rc2-r1.ebuild (renamed from net-dns/opendnssec/opendnssec-1.3.0_rc2.ebuild) | 8 |
4 files changed, 50 insertions, 13 deletions
diff --git a/net-dns/opendnssec/ChangeLog b/net-dns/opendnssec/ChangeLog index ff748482b5f9..43211367c02e 100644 --- a/net-dns/opendnssec/ChangeLog +++ b/net-dns/opendnssec/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-dns/opendnssec # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/ChangeLog,v 1.2 2011/06/02 15:38:29 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/ChangeLog,v 1.3 2011/06/06 18:44:39 scarabeus Exp $ + +*opendnssec-1.3.0_rc2-r1 (06 Jun 2011) + + 06 Jun 2011; Tomáš Chvátal <scarabeus@gentoo.org> + -opendnssec-1.3.0_rc2.ebuild, +opendnssec-1.3.0_rc2-r1.ebuild, + files/opendnssec.confd, files/opendnssec.initd: + Improve the initscript to die on certain occasions. Rerun the pkg_pretend + phase as the variables are not ensured to be saved. 02 Jun 2011; Tomáš Chvátal <scarabeus@gentoo.org> opendnssec-1.3.0_rc2.ebuild: 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 } diff --git a/net-dns/opendnssec/opendnssec-1.3.0_rc2.ebuild b/net-dns/opendnssec/opendnssec-1.3.0_rc2-r1.ebuild index 1532633f1f25..128f662630e7 100644 --- a/net-dns/opendnssec/opendnssec-1.3.0_rc2.ebuild +++ b/net-dns/opendnssec/opendnssec-1.3.0_rc2-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/opendnssec-1.3.0_rc2.ebuild,v 1.3 2011/06/04 01:15:28 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/opendnssec/opendnssec-1.3.0_rc2-r1.ebuild,v 1.1 2011/06/06 18:44:39 scarabeus Exp $ EAPI=4 @@ -76,15 +76,12 @@ check_pkcs11_setup() { if [[ -n ${PKCS11_SCA6000} ]]; then PKCS11_LIB=sca6000 PKCS11_PATH=${PKCS11_SCA6000} - elif [[ -n ${PKCS11_ETOKEN} ]]; then PKCS11_LIB=etoken PKCS11_PATH=${PKCS11_ETOKEN} - elif [[ -n ${PKCS11_NCIPHER} ]]; then PKCS11_LIB=ncipher PKCS11_PATH=${PKCS11_NCIPHER} - elif [[ -n ${PKCS11_AEPKEYPER} ]]; then PKCS11_LIB=aepkeyper PKCS11_PATH=${PKCS11_AEPKEYPER} @@ -120,6 +117,9 @@ pkg_pretend() { pkg_setup() { enewgroup opendnssec enewuser opendnssec -1 -1 -1 opendnssec + + # pretend does not preserve variables so we need to run this once more + check_pkcs11_setup } src_prepare() { |