openntpd is a lightweight and secure (S)NTP server from OpenBSD. It provides the ability to sync the local clock to remote NTP servers and can act as NTP server itself, redistributing the local clock. It doesn't support all the features NTP does (like SSL), but most people probably don't need those anyway and prefer a smaller and faster daemon. OpenNTPd support binding to a specified interface as well, something NTP doesn't support yet. IPv6 works as well.
Created attachment 35556 [details] openntpd-20040714p.ebuild
Created attachment 35557 [details] user.patch Changes the user from _ntp (OpenBSD-style) to ntp.
Created attachment 35558 [details] openntpd.rc A simple startup-script.
Created attachment 35576 [details, diff] user.patch Sorry, wrong username (nobody instead of ntp), corrected.
Hmm.. the ebuild doesn't seem to be adding the ntp account. Going through the install I see where emerge says it's adding the group and user, but there are no entries in my passwd or group for them.
Works for me, after 'emerge openntpd': $ cat /etc/passwd|grep ntp ntp:x:123:123:added by portage for openntpd:/var/empty:/bin/false After unmerge, the user gets deleted correctly also: $ cat /etc/passwd|grep ntp $ Are you sure, you have a current version of portage installed?
I should be all up to date. I have portage-2.0.50-r9. I think I figured out the problem. When you re-emerge the ebuild the pkg_postrm() is run and removes the accounts that were just added in the reemerge/upgrade. Is there any way to tell portage not to run that if we're re-emerging or upgrading?
Created attachment 35653 [details] openntpd-20040716p.ebuild I also took out the part that deleted accounts. Not sure of the right way to go about that.
OK, I think we can live without the pkg_postrm, since the user won't do any harm if it stays on the system even after openntpd has been removed.
the add user stuff seems to normally be in pkg_preinst() (e.g. /usr/portage/net-misc/ntp/ntp-4.2.0-r2.ebuild) it might also be worth adding a pkg_postinst() with something like einfo "If you just switched from xntpd (net-misc/ntp) the ntp user's" einfo "home directory needs to be changed (usermod -d /var/empty ntp)" einfo "for openntpd to start"
Created attachment 35722 [details] openntpd-20040718p.ebuild Added the info for people switching from vanilla ntpd... The asterisk docs make a loose reference to adding a user in pkg_setup(). Also, if they decide to allow the user and group to be changed through configure the user will be added before the script is run.
now in portage, thanks