diff --git a/srcpkgs/openntpd/files/openntpd/log/run b/srcpkgs/openntpd/files/openntpd/log/run new file mode 100644 index 00000000000..1401554c5c3 --- /dev/null +++ b/srcpkgs/openntpd/files/openntpd/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -t openntpd -p daemon.notice diff --git a/srcpkgs/openntpd/files/openntpd/run b/srcpkgs/openntpd/files/openntpd/run index b4b5ac53b6d..d49bf2b8964 100644 --- a/srcpkgs/openntpd/files/openntpd/run +++ b/srcpkgs/openntpd/files/openntpd/run @@ -1,3 +1,3 @@ #!/bin/sh [ -r conf ] && . ./conf -exec ntpd -d ${OPTS:=-s} +exec ntpd -d ${OPTS:=-s} 2>&1 diff --git a/srcpkgs/openntpd/template b/srcpkgs/openntpd/template index 1776ff3362d..3cc46b73f5a 100644 --- a/srcpkgs/openntpd/template +++ b/srcpkgs/openntpd/template @@ -1,7 +1,7 @@ # Template file for 'openntpd' pkgname=openntpd version=5.7p4 -revision=8 +revision=9 build_pie=yes build_style=gnu-configure configure_args="--with-privsep-user=$pkgname --with-cacert=/etc/ssl/certs.pem" @@ -17,13 +17,22 @@ checksum=a993d95976e375acc0ab1a677fd268f55024477835633c8ae404895046bccb23 conf_files="/etc/ntpd.conf" provides="ntp-daemon-0_1" -replaces="ntp-daemon>=0" system_accounts="$pkgname" +alternatives=" + ntpd:ntpd:/usr/bin/openntpd + ntpd:ntpd.8:/usr/share/man/man1/openntpd.8 + ntpd:ntpd:/etc/sv/openntpd" pre_configure() { autoreconf -fi } post_install() { + # Rename files for alternatives. + mv ${DESTDIR}/usr/bin/{ntpd,$pkgname} + mv ${DESTDIR}/usr/share/man/man8/{ntpd,openntpd}.8 + # Use a symlink instead. + rm ${DESTDIR}/usr/bin/ntpctl + ln -s openntpd ${DESTDIR}/usr/bin/ntpctl vsv $pkgname vlicense COPYING }