Index: head/net/openntpd/Makefile =================================================================== --- head/net/openntpd/Makefile (revision 442956) +++ head/net/openntpd/Makefile (revision 442957) @@ -1,51 +1,56 @@ # $FreeBSD$ PORTNAME= openntpd PORTVERSION= 6.0p1 -PORTREVISION= 6 +PORTREVISION= 7 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= OPENBSD/OpenNTPD MAINTAINER= naddy@FreeBSD.org COMMENT= Network Time Protocol (NTP) daemon LICENSE= ISCL RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss USE_RC_SUBR= openntpd USERS= _ntp GROUPS= _ntp USES= ssl GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-cacert=${LOCALBASE}/etc/ssl/cert.pem +SUB_FILES= 480.status-openntpd + pre-build: ${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \ ${WRKSRC}/src/ntpd.conf.5 ${WRKSRC}/src/ntpd.8 post-install: cd ${STAGEDIR}${PREFIX}/etc && ${MV} ntpd.conf ntpd.conf.sample + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily + ${INSTALL_SCRIPT} ${WRKDIR}/480.status-openntpd \ + ${STAGEDIR}${PREFIX}/etc/periodic/daily .include # Requires libtls from LibreSSL .if ${SSL_DEFAULT:Mlibressl*} CPPFLAGS+= -I${OPENSSLINC} LDFLAGS+= -L${OPENSSLLIB} .else # SSL_DEFAULT BUILD_DEPENDS+= ${NONEXISTENT}:security/libressl:stage CPPFLAGS+= -I${WRKDIR}/libressl/include LDFLAGS+= -L${WRKDIR}/libressl/lib # Don't use COPYTREE_SHARE here as it hard links files, and the original files # are owned by root, which creates problems of its own. pre-configure: @cd `${MAKE} -V STAGEDIR -C ${PORTSDIR}/security/libressl`${PREFIX} \ && ${FIND} -E . ! -name *.so\* | ${CPIO} -dump ${WRKDIR}/libressl >/dev/null 2>&1 .endif # SSL_DEFAULT .include Index: head/net/openntpd/files/480.status-openntpd.in =================================================================== --- head/net/openntpd/files/480.status-openntpd.in (nonexistent) +++ head/net/openntpd/files/480.status-openntpd.in (revision 442957) @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +if [ -r /etc/defaults/periodic.conf ] ; then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +ntpctl=%%PREFIX%%/sbin/ntpctl + +rc=0 + +case "$daily_status_openntpd_enable" in + [Yy][Ee][Ss]) + echo + echo 'OpenNTPD status:' + + synced=$($ntpctl -s status | tee /dev/stderr | grep 'clock synced') + if [ -z "$synced" ] ; then + rc=1 + fi + ;; +esac + +exit $rc Property changes on: head/net/openntpd/files/480.status-openntpd.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net/openntpd/pkg-plist =================================================================== --- head/net/openntpd/pkg-plist (revision 442956) +++ head/net/openntpd/pkg-plist (revision 442957) @@ -1,6 +1,7 @@ @sample etc/ntpd.conf.sample +etc/periodic/daily/480.status-openntpd man/man5/ntpd.conf.5.gz man/man8/ntpctl.8.gz man/man8/ntpd.8.gz sbin/ntpctl sbin/ntpd