The startup script does not allow changing command line flags as they are overridden by the command_args statement. The new initialisation first sets defaults and then calls load_rc_config instead of updating settings. My main problem was that I wanted to remove -s. I can now do that with htpdate_enable='YES' htpdate_flags="-l" Hopefully this is of use. . /etc/rc.subr htpdate_enable='NO' htpdate_servers='www.freebsd.org www.linux.com' htpdate_flags="-l -s" load_rc_config htpdate name=htpdate rcvar=htpdate_enable servers=${htpdate_servers} pidfile=/var/run/htpdate.pid command="/usr/local/bin/htpdate" command_args="-D $servers" stop_cmd=htpdate_stop
Created attachment 165642 [details] proposed patch If you add htpdate_extra_args="<YOUR ARGUMENTS HERE>" to /etc/rc.conf, after building and installing the software with this patch, I believe this will address your issue. Please let me know if this works. Thanks! -jgh
The patch is empty and it doesn't work. -s does not have a negating flag.
Perhaps you clicked on the details of the patch. That is empty, and I have done that myself too many times. Please click on the "diff" link, and then unified diff. Here is a link to the patch using these options. https://bz-attachments.freebsd.org/attachment.cgi?id=165642&action=diff&format=raw&headers=1
I don't see any ports using that approach. Why not use the approach that is provided by rc.subr? nick@duaca:/usr/ports % find . -name Makefile -exec grep _extra_flags \{\} + nick@duaca:/usr/ports %
The reason that has no results is that the change is not in the Makefile. I've shifted this to use htpdate_flags, as I had done to shift all of the postgresql's to profile based instances. Does the patch work for you?
Created attachment 165645 [details] updated patch updated patch
Looks fine. But haven't tried it.
A commit references this bug: Author: jgh Date: Sat Jan 16 16:40:20 UTC 2016 New revision: 406238 URL: https://svnweb.freebsd.org/changeset/ports/406238 Log: - improve startup script and allow flags to be tuneable No need to bump portrevision, as this is not changing any existing function. PR: 206287 Reported by: Nick@van-laarhoven.org Changes: head/net/htpdate/files/htpdate.in