pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/opendnssec2 Make a separate package for OpenD...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b107a87d0e6e
branches:  trunk
changeset: 417250:b107a87d0e6e
user:      he <he%pkgsrc.org@localhost>
date:      Wed Nov 06 13:44:38 2019 +0000

description:
Make a separate package for OpenDNSSEC version 2.1.5.

OpenDNSSEC version 2 is not a drop-in replacement for OpenDNSSEC version 1.
See lib/opendnssec/README.md for migration instructions if you were
previously using version 1.

Upstream changes since OpenDNSSEC version 1.4.x:


OpenDNSSEC 2.1.5 - 2019-11-05

* SUPPORT-245: Resolve memory leak in signer introduced in 2.1.4.
* SUPPORT-244: Don't require Host and Port to be specified in conf.xml
  when migrating with a MySQL-based enforcer database backend.
* Allow for MySQL database to pre-exist when performing a migration,
  and be a bit more verbose during migration.
* New -f argument to ods-enforcer key list to show the full list of key states,
  similar to combinining -d and -v.
* Fix AllowExtraction tag in configuration file definition (thanks to raixie1A).
* SUPPORT-242: Skip over EDNS cookie option (thanks to H?vard Eidne and
  Ulrich-Lorenz Schlueter).
* SUPPORT-240: Prevent exit of enforcer daemon upon interrupted interaction
  with CLI commands.
* Correct some error messages (thanks to Jonas Berlin).


OpenDNSSEC 2.1.4 - 2019-05-16

* SUPPORT-229: Missing signatures for key new while signatures for old key
  still present under certain kasp policies, leading to bogus zones.
  Root cause for bug existed but made prominent since 2.1.3 release.
* OPENDNSSEC-942: time leap command for signer for debugging purposes
  only, not to be used on actual deployments.
* OPENDNSSEC-943: support build on MacOS with missing pthread barriers
* SUPPORT-229: fixed for too early retivement of signatures upon double
  rrsig key roll signing strategy.
* Strip build directory from doxygen docs
* remove bashisms from ods-kasp2html.in
* upgrade developer build scripts to softhsm-2.5.0 update some platform
  dependent files (only for developers).
* The ods-signer and ods-signerd man page should be in section 8 not 22
  Note that this might mean that package managers should remove the older
  man pages from the old location.


OpenDNSSEC 2.1.3 - 2017-08-10

* OPENDNSSEC-508: Tag <RolloverNotification> was not functioning correctly
* OPENDNSSEC-901: Enforcer would ignore <ManualKeyGeneration/> tag in conf.xml
* OPENDNSSEC-906: Tag <AllowExtraction> tag included from late 1.4 development
* OPENDNSSEC-894: repair configuration script to allow excluding the build of
                  the enforcer.
* OPENDNSSEC-890: Mismatching TTLs in record sets would cause bogus signatures.
* OPENDNSSEC-886: Improper time calculation on 32 bits machine causes purge
                  time to be skipped.
* OPENDNSSEC-904 / SUPPORT-216 autoconfigure fails to properly identify
                  functions in ssl library on certain distributions
                  causing tsig unknown algorithm hmac-sha256
* OPENDNSSEC-908: Warn when TTL exceeds KASP's MaxZoneTTL instead of capping.


OpenDNSSEC 2.1.1 - 2017-04-28

* OPENDNSSEC-882: Signerd exit code always non-zero.
* OPENDNSSEC-889: MySQL migration script didn't work for all database and
  MySQL versions.
* OPENDNSSEC-887: Segfault on extraneous <Interval> tag.
* OPENDNSSEC-880: Command line parsing for import key command failed.
* OPENDNSSEC-890: Bogus signatures upon wrong zone input when TTLs for
  same rrset are mismatching.


OpenDNSSEC 2.1.0 - 2017-02-22

* If listening port for signer is not set in conf file, the default value
  "15354" is used.
* Enforce and signconf tasks are now scheduled individually per zone. Resign
  per policy.
* OPENDNSSEC-450: Implement support for ECDSA P-256, P-384, GOST.
  Notice: SoftHSMv1 only supports RSA. SoftHSMv2 can be compiled with
  support for these.
* zone delete removes tasks associated with zone from queue.
* Show help for ods-enforcer-db-setup
* OPENDNSSEC-778: Double NSEC3PARAM record after resalt.
* In the kasp file, KSK/ZSK section, the algorithm length MUST be set now.
* signer clear <zone> would assert when signconf wasn't read yet.
* The <Interval> tag had been deprecated, and is now no longer allowed to
  be specified in the conf.xml for the Enforcer.
* OPENDNSSEC-864: ods-signer didn't print help. Also --version and --socket
  options where not processed.
* OPENDNSSEC-869: ds-seen command did not give error on badly formatted keytag.
* OPENDNSSEC-681: After fork() allow child process to pass error messages to
  parent so they can be printed to the console in case of failed start.
* OPENDNSSEC-849: Crash on free of part of IXFR structure.
* OPENDNSSEC-759: Reduce HSM access during ods-signerd start. Daemon should
  start quicker and earlier available for user input.
* OPENDNSSEC-479: Transferring zones and sending notifies through
  a bound socket , using the same interface as listener.
* Key cache is now shared between threads.
* OPENDNSSEC-858: Don't print "completed in x seconds" to stderr for enforcer
  commands.
* Various memory leaks
* OPENDNSSEC-601: signer and enforcer working dir would not properly
  fallback to default when not specified.
* OPENDNSSEC-503: Speed up initial signing and algorithm rollover.
* A bash autocompletion script is included in contrib for ods-enforcer and
  ods-signer.
* SUPPORT-208: Strip comment from key export.
* OPENDNSSEC-552: On key export don't print SHA1 DS by default.
  (introduced --sha1 option to key export.) Usage of sha1 is deprecated and
  will be removed from future versions of OpenDNSSEC.


OpenDNSSEC 2.0.1 - 2016-07-21

* Fixed crash and linking issue in ods-migrate.
* Fixed case where 2.0.0 could not read backup files from 1.4.10.
* Fixed bug in migration script where key state wasn't transformed properly.


OpenDNSSEC 2.0.0-1

* include db creation scripts in dist tarball needed for migration from 1.4.


OpenDNSSEC 2.0.0 - 2016-07-07

* OpenDNSSEC-99: Skip "are you sure" messages. Add --force and -f flag to
  ods-enforcer-db-setup and hsmutil purge
* OPENDNSSEC-808: Crash on query with empty query section (thanks
  Havard Eidnes)
* OpenDNSSEC-771: Signer. Do not log warning on deleting a missing
  NSEC3PARAM RR.
* OPENDNSSEC-801: Set AA flag on outgoing AXFR.
* SUPPORT-191: Regression, Must accept notify without SOA (thanks
  Christos Trochalakis)


OpenDNSSEC 2.0b1 - 2016-04-14

First public release of OpenDNSSEC.  Initial pre-releases have been
made to a smaller audience, this pre-release is explicitly made available
to all.  At this moment, there are no known functional bugs.  There are
naturally issues, especially to make working with OpenDNSSEC easier, however
none should prevent you to use OpenDNSSEC in production for the average
case, even though this is a pre-release.  Which is because of the still
limited documentation, and is not being run in production yet.

* The enforcer can no longer be run on a single policy at a time
  anymore.  An enforce run will always process all zones.
* The key generate method is at this time not available.
* The key export method will not allow you to export keys for all zones
  at once (--all flag) or for a particular type of key (--keystate).
  It will not export ZSK keys.
* The zonelist.xml in etc/opendnssec is no longer updated automatically,
  and by default works as if the --no-xml flag was specified.  Use
  --xml to the zone add command to update the zonelist.xml.  If updating
  the zonelist fails, the zone will still be added and not updated in
  the xml with future zone adds.
* Plugins directory renamed to contrib.
* Default signer working directory renamed from tmp to signer.
* Configure option --with-database-backend renamed --with-enforcer-database
* Zones on a manual rollover policy will not get a key assigned to them
  immediately.


OpenDNSSEC 2.0.0a5

Project transfer to NLnetLabs, performing code drop as-is for evaluation
purposes only.


OpenDNSSEC 2.0.0a4 (EnforcerNG branch)

* SUPPORT-72: Improve logging when failed to increment serial in case
  of key rollover and serial value "keep" [OPENDNSSEC-461].
* SUPPORT-114: libhsm: Optimize storage in HSM by deleting the public
  key directly if SkipPublicKey is used [OPENDNSSEC-573].
* OPENDNSSEC-106: Add 'ods-enforcerd -p <policy>' option. This prompts the
  enforcer to run once and only process the specified policy and associated
  zones.
* OPENDNSSEC-330: NSEC3PARAM TTL can now be optionally configured in kasp.xml.
  Default value remains PT0S.
* OPENDNSSEC-390: ods-ksmutil: Add an option to the 'ods-ksmutil key ds-seen'
  command so the user can choose not to notify the enforcer.
* OPENDNSSEC-430: ods-ksmutil: Improve 'zone add' - Zone add command
  could warn if a specified zone file or adapter file does not exits.
* OPENDNSSEC-431: ods-ksmutil: Improve 'zone add' - Support default <input>
  and <output> values for DNS adapters.
* OPENDNSSEC-454: ods-ksmutil: Add option for 'ods-ksmutil key import' to
  check if there is a matching key in the repository before import.
* OPENDNSSEC-281: Enforcer NG: Commandhandler sometimes unresponsive.
* OPENDNSSEC-276, Enforcer NG: HSM initialized after fork().
* OPENDNSSEC-330: Signer Engine: NSEC3PARAM TTL is default TTL again, to
  prevent bad caching effects on resolvers.
* OPENDNSSEC-428: Add option for 'ods-ksmutil key generate' to take
  number of zones as a parameter
* OPENDNSSEC-515: Signer Engine: Don't replace tabs in RR with whitespace.

Bugfixes:
* OPENDNSSEC-435: Signer Engine: Fix a serious memory leak in signature
  cleanup.
* OPENDNSSEC-463: Signer Engine: Duration PT0S is now printed correctly.
* OPENDNSSEC-466: Signer Engine: Created bad TSIG signature when falling back
  to AXFR.
* OPENDNSSEC-467: Signer Engine: After ods-signer clear, signer should not use
  inbound serial.


OpenDNSSEC 2.0.0a3 (EnforcerNG branch) - 2012-06-18
Bugfixes:
* SUPPORT-66: Signer Engine: Fix file descriptor leak in case of TCP write
  error [OPENDNSSEC-427].
* SUPPORT-71: Signer Engine: Fix double free crash in case of HSM connection
  error during signing [OPENDNSSEC-444].
* OPENDNSSEC-401: 'ods-signer sign <zone> --serial <nr>' command produces seg
  fault when run directly on command line (i.e. not via interactive mode)
* OPENDNSSEC-440: 'ods-ksmutil key generate' and the enforcer can create
  too many keys if there are keys already available and the KSK and ZSK use
  same algorithm and length
* OPENDNSSEC-424: Signer Engine: Respond to SOA queries from file instead
  of memory. Makes response non-blocking.
* OPENDNSSEC-425 Change "hsmutil list" output so that the table header goes
  to stdout not stderr
* OPENDNSSEC-438: 'ods-ksmutil key generate' and the enforcer can create
  too many keys for <SharedKeys/> policies when KSK and ZSK use same
  algorithm and length
* OPENDNSSEC-443: ods-ksmutil: Clean up of hsm connection handling
* Signer Engine: Improved Inbound XFR checking.
* Signer Engine: Fix double free corruption in case of adding zone with
  DNS Outbound Adapters and NotifyCommand enabled.
* Enforcer: Limit number of pregenerated keys when using <SharedKeys>.
* Enforcer: MySQL database backend implemented.
* Enforcer: New directive <MaxZoneTTL> to make safe assumptions about
  zonefile.
* Enforcer: New zone add command, allow specifying adapters.
* Enforcer: New zone del command, use --force for still signed zones.
* Enforcer: Pre-generate keys on the HSM.
* Enforcer: SQLite database backend implemented.
* OPENDNSSEC-247: Signer Engine: TTL on NSEC3 was not updated on SOA
  Minimum change.

Bugfixes:
* OPENDNSSEC-481: libhsm: Fix an off-by-one length check error.
* OPENDNSSEC-482: libhsm: Improved cleanup for C_FindObjects.

diffstat:

 security/opendnssec2/DESCR                          |    4 +
 security/opendnssec2/MESSAGE                        |   10 +
 security/opendnssec2/Makefile                       |  111 ++++++++++++++++
 security/opendnssec2/PLIST                          |   57 ++++++++
 security/opendnssec2/distinfo                       |    7 +
 security/opendnssec2/files/opendnssec.sh            |  134 ++++++++++++++++++++
 security/opendnssec2/options.mk                     |   15 ++
 security/opendnssec2/patches/patch-conf_Makefile.in |   46 ++++++
 8 files changed, 384 insertions(+), 0 deletions(-)

diffs (truncated from 416 to 300 lines):

diff -r 9d3e9082eb6d -r b107a87d0e6e security/opendnssec2/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendnssec2/DESCR        Wed Nov 06 13:44:38 2019 +0000
@@ -0,0 +1,4 @@
+The OpenDNSSEC project announces the development of Open Source software
+that manages the security of domain names on the Internet.
+The project intends to drive adoption of Domain Name System Security Extensions
+(DNSSEC) to further enhance Internet security.
diff -r 9d3e9082eb6d -r b107a87d0e6e security/opendnssec2/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendnssec2/MESSAGE      Wed Nov 06 13:44:38 2019 +0000
@@ -0,0 +1,10 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2019/11/06 13:44:38 he Exp $
+
+For latest information about configuring OpenDNSSEC, see:
+https://wiki.opendnssec.org/display/DOCS20
+
+If you are upgrading OpenDNSSEC from release 1.4, please see
+at the included lib/opendnssec/README.md file and the files in that directory.
+
+===========================================================================
diff -r 9d3e9082eb6d -r b107a87d0e6e security/opendnssec2/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendnssec2/Makefile     Wed Nov 06 13:44:38 2019 +0000
@@ -0,0 +1,111 @@
+# $NetBSD: Makefile,v 1.1 2019/11/06 13:44:38 he Exp $
+#
+
+DISTNAME=      opendnssec-2.1.5
+PKGNAME=       ${DISTNAME:S/opendnssec/opendnssec2/}
+CATEGORIES=    security net
+MASTER_SITES=  https://www.opendnssec.org/files/source/
+
+MAINTAINER=    he%NetBSD.org@localhost
+HOMEPAGE=      https://www.opendnssec.org/
+COMMENT=       OSS for a fast and easy DNSSEC deployment
+LICENSE=       2-clause-bsd
+
+BUILD_DEPENDS+=        CUnit-[0-9]*:../../devel/cunit
+DEPENDS+=      ldns>=1.6.17:../../net/ldns
+
+# Uses the same package name, but is not a full drop-in replacement for...
+CONFLICTS+=    opendnssec-1.*
+
+BUILD_DEFS+=   VARBASE
+
+USE_TOOLS+=    bash gmake
+CONFIG_SHELL=  ${BASH}
+USE_LANGUAGES= c99 c++
+USE_LIBTOOL=   yes
+
+GNU_CONFIGURE=         yes
+CONFIGURE_ARGS+=       --prefix=${PREFIX:Q}
+CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
+CONFIGURE_ARGS+=       --with-ssl=${BUILDLINK_PREFIX.openssl}
+
+CONVERT_DIR=   enforcer/utils/1.4-2.0_db_convert
+REPLACE_BASH+= ${CONVERT_DIR}/convert_mysql
+REPLACE_BASH+= ${CONVERT_DIR}/convert_sqlite
+
+ODS_USER?=     opendnssec
+ODS_GROUP?=    opendnssec
+
+PKG_GROUPS=            ${ODS_GROUP}
+PKG_USERS=             ${ODS_USER}:${ODS_GROUP}
+PKG_GECOS.${ODS_USER}= OpenDNSSEC user
+PKG_HOME.${ODS_USER}=  ${VARBASE}/opendnssec
+PKG_SHELL.${ODS_USER}= ${SH}
+PKG_USERS_VARS+=       ODS_USER
+PKG_GROUPS_VARS+=      ODS_GROUP
+
+EGDIR=                 ${PREFIX}/share/examples/opendnssec
+DOCDIR=                        ${PREFIX}/share/doc/opendnssec
+MIGRATEDIR=            ${PREFIX}/lib/opendnssec
+PKG_SYSCONFSUBDIR=     opendnssec
+
+MIGRATE_FILES+=                README.md convert_mysql convert_sqlite
+MIGRATE_FILES+=                find_problematic_zones.sql mysql_convert.sql
+MIGRATE_FILES+=                sqlite_convert.sql
+
+SUBST_CLASSES+=                paths
+SUBST_FILES.paths=     ${WRKSRC}/conf/Makefile.in
+SUBST_STAGE.paths=     pre-configure
+SUBST_VARS.paths=      EGDIR
+
+# Prepare files for installation
+SUBST_CLASSES+=                migrate
+SUBST_FILES.migrate+=  ${WRKSRC}/${CONVERT_DIR}/convert_sqlite
+SUBST_FILES.migrate+=  ${WRKSRC}/${CONVERT_DIR}/convert_mysql
+SUBST_STAGE.migrate=   pre-configure
+SUBST_SED.migrate=     -e 's,SCHEMA=../../src/db/,SCHEMA=./,'
+
+CXXFLAGS.NetBSD+=      -D_NETBSD_SOURCE
+
+CONF_FILES+=   ${EGDIR}/addns.xml.sample \
+                       ${PKG_SYSCONFDIR}/addns.xml
+CONF_FILES+=   ${EGDIR}/conf.xml.sample \
+                       ${PKG_SYSCONFDIR}/conf.xml
+CONF_FILES+=   ${EGDIR}/kasp.xml.sample \
+                       ${PKG_SYSCONFDIR}/kasp.xml
+CONF_FILES+=   ${EGDIR}/zonelist.xml.sample \
+                       ${PKG_SYSCONFDIR}/zonelist.xml
+
+INSTALLATION_DIRS=     ${DOCDIR} ${EGDIR}
+INSTALLATION_DIRS+=    share/opendnssec
+INSTALLATION_DIRS+=    lib/opendnssec
+INSTALLATION_DIRS+=    lib/opendnssec/signer
+INSTALLATION_DIRS+=    lib/opendnssec/kasp_auditor
+OWN_DIRS+=             ${VARBASE}/opendnssec
+OWN_DIRS+=             ${VARBASE}/opendnssec/tmp
+OWN_DIRS+=             ${VARBASE}/opendnssec/signconf
+OWN_DIRS+=             ${VARBASE}/opendnssec/signed
+OWN_DIRS+=             ${VARBASE}/opendnssec/unsigned
+
+RCD_SCRIPTS=           opendnssec
+
+.include "options.mk"
+
+pre-install:
+       ${MKDIR} ${DESTDIR}${PKG_SYSCONFDIR}
+
+post-install:
+       for f in ${MIGRATE_FILES}; do \
+               ${INSTALL} ${WRKSRC}/enforcer/utils/1.4-2.0_db_convert/$$f \
+                       ${DESTDIR}/${MIGRATEDIR}; \
+       done
+       ${INSTALL} ${WRKSRC}/enforcer/src/db/schema.mysql \
+               ${DESTDIR}/${MIGRATEDIR}
+       ${INSTALL} ${WRKSRC}/enforcer/src/db/schema.sqlite \
+               ${DESTDIR}/${MIGRATEDIR}
+
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../net/ldns/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 9d3e9082eb6d -r b107a87d0e6e security/opendnssec2/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendnssec2/PLIST        Wed Nov 06 13:44:38 2019 +0000
@@ -0,0 +1,57 @@
+@comment $NetBSD: PLIST,v 1.1 2019/11/06 13:44:38 he Exp $
+bin/ods-hsmspeed
+bin/ods-hsmutil
+bin/ods-kasp2html
+bin/ods-kaspcheck
+lib/opendnssec/README.md
+lib/opendnssec/convert_mysql
+lib/opendnssec/convert_sqlite
+lib/opendnssec/find_problematic_zones.sql
+lib/opendnssec/mysql_convert.sql
+lib/opendnssec/schema.mysql
+lib/opendnssec/schema.sqlite
+lib/opendnssec/sqlite_convert.sql
+man/man1/ods-hsmspeed.1
+man/man1/ods-hsmutil.1
+man/man1/ods-kaspcheck.1
+man/man5/ods-kasp.5
+man/man5/ods-timing.5
+man/man7/opendnssec.7
+man/man8/ods-control.8
+man/man8/ods-enforcer-db-setup.8
+man/man8/ods-enforcer.8
+man/man8/ods-enforcerd.8
+man/man8/ods-signer.8
+man/man8/ods-signerd.8
+sbin/ods-control
+sbin/ods-enforcer
+sbin/ods-enforcer-db-setup
+sbin/ods-enforcerd
+sbin/ods-migrate
+sbin/ods-signer
+sbin/ods-signerd
+share/examples/opendnssec/addns.xml
+share/examples/opendnssec/addns.xml.sample
+share/examples/opendnssec/conf.xml
+share/examples/opendnssec/conf.xml.sample
+share/examples/opendnssec/kasp.xml
+share/examples/opendnssec/kasp.xml.sample
+share/examples/opendnssec/zonelist.xml
+share/examples/opendnssec/zonelist.xml.sample
+share/opendnssec/addns.rnc
+share/opendnssec/addns.rng
+share/opendnssec/conf.rnc
+share/opendnssec/conf.rng
+share/opendnssec/enforcerstate.rnc
+share/opendnssec/enforcerstate.rng
+share/opendnssec/kasp.rnc
+share/opendnssec/kasp.rng
+share/opendnssec/kasp2html.xsl
+share/opendnssec/signconf.rnc
+share/opendnssec/signconf.rng
+share/opendnssec/zonelist.rnc
+share/opendnssec/zonelist.rng
+@pkgdir share/doc/opendnssec
+@pkgdir lib/opendnssec/signer
+@pkgdir lib/opendnssec/kasp_auditor
+@pkgdir etc/opendnssec
diff -r 9d3e9082eb6d -r b107a87d0e6e security/opendnssec2/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendnssec2/distinfo     Wed Nov 06 13:44:38 2019 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2019/11/06 13:44:38 he Exp $
+
+SHA1 (opendnssec-2.1.5.tar.gz) = 550ac98a9a1dca7d32015cf5ffd5fee7771ec2c7
+RMD160 (opendnssec-2.1.5.tar.gz) = 0aa55836d55023503c4746babc55f7bf88430232
+SHA512 (opendnssec-2.1.5.tar.gz) = 33d6764d7bd8d8d31f0f6290f3c5cacfc523419ac0984b9e0b17f5768d3d60b58f6a339cf8430e98d9386c0ce5c502d4a43429d697fbfc43a1fbba5acbb9b423
+Size (opendnssec-2.1.5.tar.gz) = 1118221 bytes
+SHA1 (patch-conf_Makefile.in) = 83fdf2650bfe63688b072dcb8019d44b62f6f016
diff -r 9d3e9082eb6d -r b107a87d0e6e security/opendnssec2/files/opendnssec.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/opendnssec2/files/opendnssec.sh  Wed Nov 06 13:44:38 2019 +0000
@@ -0,0 +1,134 @@
+#!/bin/sh
+#
+# $NetBSD: opendnssec.sh,v 1.1 2019/11/06 13:44:38 he Exp $
+#
+
+# PROVIDE: opendnssec
+# REQUIRE: NETWORKING mountcritremote syslogd
+# BEFORE:  DAEMON
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="opendnssec"
+rcvar=$name
+
+start_cmd=ods_start
+stop_cmd=ods_stop
+restart_cmd=ods_restart
+status_cmd=ods_status
+poll_cmd=ods_poll
+
+enforcer_pidfile=/var/run/opendnssec/enforcerd.pid
+signerd_pidfile=/var/run/opendnssec/signerd.pid
+
+enforcer=/usr/pkg/sbin/ods-enforcerd
+signer=/usr/pkg/sbin/ods-signerd
+
+ods_control=/usr/pkg/sbin/ods-control
+
+# Gain PID related commands
+pidfile=$enforcer_pidfile
+procname=$enforcer
+
+ods_start () {
+
+       rv=0
+       if [ -f $enforcer_pidfile ]; then
+               ep=$(check_pidfile $enforcer_pidfile $enforcer)
+
+               if [ "$ep" != "" ]; then
+                       echo 1>&2 "$enforcer already running (pid=$ep)"
+                       rv=$(($rv + 1))
+               fi
+       fi
+
+       if [ -f $signerd_pidfile ]; then
+               sp=$(check_pidfile $signerd_pidfile $signer)
+               if [ "$sp" != "" ]; then
+                       echo 1>&2 "$signer already running (pid=$sp)"
+                       rv=$(($rv + 1))
+               fi
+       fi
+       if [ $rv != 0 ]; then
+               exit $rv
+       fi
+
+       $ods_control start
+}
+
+ods_stop () {
+
+       rv=0
+       pids=""
+       if [ -f $enforcer_pidfile ]; then
+               ep=$(check_pidfile $enforcer_pidfile $enforcer)
+               if [ "$ep" != "" ]; then
+                       pids="$pids $ep"
+               else
+                       echo 1>&2 \
+                           "$enforcer not running (check $enforcer_pidfile)"
+                       rv=$(($rv + 1))
+               fi
+       else
+               echo 1>&2 "$enforcer not running (no $enforcer_pidfile file)"
+               rv=$(($rv + 1))
+       fi
+       if [ -f $signerd_pidfile ]; then
+               sp=$(check_pidfile $signerd_pidfile $signer)
+               if [ "$sp" != "" ]; then
+                       pids="$pids $sp"
+               else
+                       echo 1>&2 "$signer not running (check $signerd_pidfile)"
+                       rv=$(($rv + 1))
+               fi
+       else
+               echo 1>&2 "$signer not running (no $signerd_pidfile file)"
+               rv=$(($rv + 1))
+       fi



Home | Main Index | Thread Index | Old Index