From owner-svn-ports-all@freebsd.org Thu Jun 8 20:29:23 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAB64C7926C; Thu, 8 Jun 2017 20:29:23 +0000 (UTC) (envelope-from naddy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7952F7065D; Thu, 8 Jun 2017 20:29:23 +0000 (UTC) (envelope-from naddy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v58KTM4L070833; Thu, 8 Jun 2017 20:29:22 GMT (envelope-from naddy@FreeBSD.org) Received: (from naddy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v58KTMRH070830; Thu, 8 Jun 2017 20:29:22 GMT (envelope-from naddy@FreeBSD.org) Message-Id: <201706082029.v58KTMRH070830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: naddy set sender to naddy@FreeBSD.org using -f From: Christian Weisgerber Date: Thu, 8 Jun 2017 20:29:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r442957 - in head/net/openntpd: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 20:29:23 -0000 Author: naddy Date: Thu Jun 8 20:29:22 2017 New Revision: 442957 URL: https://svnweb.freebsd.org/changeset/ports/442957 Log: Add a periodic script for daily status. Submitted by: Alexander Milanov Added: head/net/openntpd/files/480.status-openntpd.in (contents, props changed) Modified: head/net/openntpd/Makefile head/net/openntpd/pkg-plist Modified: head/net/openntpd/Makefile ============================================================================== --- head/net/openntpd/Makefile Thu Jun 8 19:58:20 2017 (r442956) +++ head/net/openntpd/Makefile Thu Jun 8 20:29:22 2017 (r442957) @@ -2,7 +2,7 @@ PORTNAME= openntpd PORTVERSION= 6.0p1 -PORTREVISION= 6 +PORTREVISION= 7 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= OPENBSD/OpenNTPD @@ -23,12 +23,17 @@ 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 Added: head/net/openntpd/files/480.status-openntpd.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/openntpd/files/480.status-openntpd.in Thu Jun 8 20:29:22 2017 (r442957) @@ -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 Modified: head/net/openntpd/pkg-plist ============================================================================== --- head/net/openntpd/pkg-plist Thu Jun 8 19:58:20 2017 (r442956) +++ head/net/openntpd/pkg-plist Thu Jun 8 20:29:22 2017 (r442957) @@ -1,4 +1,5 @@ @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