Index: Makefile =================================================================== --- Makefile (revision 416566) +++ Makefile (working copy) @@ -2,6 +2,7 @@ PORTNAME= openntpd PORTVERSION= 6.0p1 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= net MASTER_SITES= OPENBSD/OpenNTPD Index: files/openntpd.in =================================================================== --- files/openntpd.in (revision 416566) +++ files/openntpd.in (working copy) @@ -12,22 +12,38 @@ # # openntpd_enable (bool): Set to NO by default. # Set it to YES to enable openntpd. +# openntpd_config (str): Path to ntpd.conf +# Default: %%PREFIX%%/etc/ntpd.conf +# openntpd_flags (str): Flags passwd to ntpd(8) +# Default: none . /etc/rc.subr -check_process() -{ - pgrep -f $command -} - name=openntpd rcvar=openntpd_enable -command=%%PREFIX%%/sbin/ntpd -required_files=%%PREFIX%%/etc/ntpd.conf +start_precmd="openntpd_checkconfig" +restart_precmd="openntpd_checkconfig" +configtest_cmd="openntpd_checkconfig" +extra_commands="configtest" load_rc_config $name -: ${openntpd_enable="NO"} +: ${openntpd_enable:="NO"} +: ${openntpd_config:="%%PREFIX%%/etc/ntpd.conf"} +command=%%PREFIX%%/sbin/ntpd +command_args="-f ${openntpd_config}" +required_files=${openntpd_config} + +check_process() +{ + pgrep -f $command +} + +openntpd_checkconfig() +{ + eval ${command} ${command_args} ${openntpd_flags} -n +} + run_rc_command "$1"