aboutsummaryrefslogtreecommitdiff
path: root/net/openntpd
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2014-06-02 15:03:34 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2014-06-02 15:03:34 +0000
commit6c86c5b1750a8ca8ecaef26b119149bc1078a6ea (patch)
treee89e2a3183ce378fc6e761d6f84d495220027bb0 /net/openntpd
parentabeb3b7cc4f70549b851d41b9bd899ba17bfa3a5 (diff)
The sample configurarion file moves to etc/ntpd.conf.sample.
Fix a race and make sure the rc.d script only matches the master process.
Notes
Notes: svn path=/head/; revision=356234
Diffstat (limited to 'net/openntpd')
-rw-r--r--net/openntpd/Makefile6
-rw-r--r--net/openntpd/files/openntpd.in5
-rw-r--r--net/openntpd/pkg-plist5
3 files changed, 9 insertions, 7 deletions
diff --git a/net/openntpd/Makefile b/net/openntpd/Makefile
index 6892f96e8ef2..902a238bd200 100644
--- a/net/openntpd/Makefile
+++ b/net/openntpd/Makefile
@@ -2,7 +2,7 @@
PORTNAME= openntpd
PORTVERSION= 4.6
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 2
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_OPENBSD}
@@ -30,7 +30,7 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/ntpd ${STAGEDIR}${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/ntpd.conf.5 ${STAGEDIR}${PREFIX}/man/man5
${INSTALL_MAN} ${WRKSRC}/ntpd.8 ${STAGEDIR}${PREFIX}/man/man8
- ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- ${INSTALL_DATA} ${FILESDIR}/ntpd.conf ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${FILESDIR}/ntpd.conf \
+ ${STAGEDIR}${PREFIX}/etc/ntpd.conf.sample
.include <bsd.port.mk>
diff --git a/net/openntpd/files/openntpd.in b/net/openntpd/files/openntpd.in
index 51092c0dbca3..c6dfb9074c0e 100644
--- a/net/openntpd/files/openntpd.in
+++ b/net/openntpd/files/openntpd.in
@@ -15,6 +15,11 @@
. /etc/rc.subr
+check_process()
+{
+ /bin/pgrep -f 'ntpd: \[priv\]'
+}
+
name=openntpd
rcvar=openntpd_enable
diff --git a/net/openntpd/pkg-plist b/net/openntpd/pkg-plist
index f0c06dcaef67..9c94ab37897c 100644
--- a/net/openntpd/pkg-plist
+++ b/net/openntpd/pkg-plist
@@ -1,7 +1,4 @@
+@sample etc/ntpd.conf.sample
man/man5/ntpd.conf.5.gz
man/man8/ntpd.8.gz
sbin/ntpd
-@unexec if cmp -s %D/etc/ntpd.conf %D/%%EXAMPLESDIR%%/ntpd.conf; then rm -f %D/etc/ntpd.conf; fi
-%%EXAMPLESDIR%%/ntpd.conf
-@exec if [ ! -f %D/etc/ntpd.conf ]; then cp %D/%F %D/etc; fi
-@dirrm %%EXAMPLESDIR%%