Re: Cannot specify ntpd binary in ports with ntpd startup file.

2018-08-30 Thread Cy Schubert
In message 
, Adam Weinberger writes:
> On Tue, Aug 28, 2018 at 6:34 PM Dan Mahoney (Gushi)  wrote
> :
> >
> > 1) Got the version wrong.  I'm on 10.4.
> >
> > 2) Forgot a subject.  Whoops.
> >
> > 3) Forgot to cc maintainer.  Doh!
> >
> > -Dan
> >
> > On Tue, 28 Aug 2018, Dan Mahoney (Gushi) wrote:
> >
> > > Hey all,
> > >
> > > Funny question.  I'm on FreeBSD 11.4, and would like to use the latest
> > > version of NTP, which is in pkg.
> > >
> > > The version in pkg doesn't have a startup script, which I'm not sure is
> > > supposed to be the case.  I know for things like BIND (when it was both i
> n
> > > base and in ports) you could override the binary in /etc/rc.conf.
> > >
> > > However, the version of /etc/rc.d/ntpd in BASE doesn't seem to have the
> > > ability to override the binary in rc.conf:
> > >
> > > name="ntpd"
> > > rcvar="ntpd_enable"
> > > command="/usr/sbin/${name}"
> > > pidfile="/var/run/${name}.pid"
> > > extra_commands="fetch"
> > > fetch_cmd="ntpd_fetch_leapfile"
> > > start_precmd="ntpd_precmd"
> > >
> > > What's weirder, is even if I manually modify the /etc/rc.d/ntpd file to p
> oint
> > > at /usr/local/sbin (which I should never have to do), the version in
> > > /usr/sbin gets started.
> > >
> > > root@vortex2:/etc/rc.d # service ntpd start
> > > Starting ntpd.
> > > root@vortex2:/etc/rc.d # ps auxwww|grep ntpd
> > > root 36362  38.3  0.2 26192 18132  -  Ss   12:17AM0:04.73
> > > /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drif
> t
> > > root 36364   0.0  0.0 18844  2328  1  R+   12:17AM0:00.00 grep nt
> pd
> > > root@vortex2:/etc/rc.d # grep command ntpd
> > > command="/usr/local/sbin/${name}"
> > > [...]
> > >
> > > So, asking as a port maintainer, a few questions:
> > >
> > > 0) Why the heck is it doing this even when I override the path?
> > >
> > > 1) How can we encourage base to allow override of command_name?
> > >
> > > 2) Is this a brokenness in the port that it doesn't ship with a startup f
> ile?
> > >
> > > 3) Not strictly related, but what's the proper case for pathing since thi
> ngs
> > > like "ntpq", the base path would naturally be found in any standard $PATH
> .
> > > Some ports used to have an overwrite_base option, but this also feels wro
> ng
> > > as it breaks freebsd-update in various ways.  I.e. should the port print 
> a
> > > message stating that you should chmod 000 the original binaries?  Should 
> the
> > > ports versions be named something different?  Should the port just warn y
> ou
> > > that you need to call these things by absolute path, always?
> > >
> > > -Dan
>
> Ping: cy
>
> Why does net/ntp not include an rc(8) script or a pkg-message
> describing how to activate it? It would go a long way if you could add
> at least one of those things.

The former makes no sense but the latter could be done. I'll put it on 
my todo list.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Cannot specify ntpd binary in ports with ntpd startup file.

2018-08-30 Thread Adam Weinberger
On Tue, Aug 28, 2018 at 6:34 PM Dan Mahoney (Gushi)  wrote:
>
> 1) Got the version wrong.  I'm on 10.4.
>
> 2) Forgot a subject.  Whoops.
>
> 3) Forgot to cc maintainer.  Doh!
>
> -Dan
>
> On Tue, 28 Aug 2018, Dan Mahoney (Gushi) wrote:
>
> > Hey all,
> >
> > Funny question.  I'm on FreeBSD 11.4, and would like to use the latest
> > version of NTP, which is in pkg.
> >
> > The version in pkg doesn't have a startup script, which I'm not sure is
> > supposed to be the case.  I know for things like BIND (when it was both in
> > base and in ports) you could override the binary in /etc/rc.conf.
> >
> > However, the version of /etc/rc.d/ntpd in BASE doesn't seem to have the
> > ability to override the binary in rc.conf:
> >
> > name="ntpd"
> > rcvar="ntpd_enable"
> > command="/usr/sbin/${name}"
> > pidfile="/var/run/${name}.pid"
> > extra_commands="fetch"
> > fetch_cmd="ntpd_fetch_leapfile"
> > start_precmd="ntpd_precmd"
> >
> > What's weirder, is even if I manually modify the /etc/rc.d/ntpd file to 
> > point
> > at /usr/local/sbin (which I should never have to do), the version in
> > /usr/sbin gets started.
> >
> > root@vortex2:/etc/rc.d # service ntpd start
> > Starting ntpd.
> > root@vortex2:/etc/rc.d # ps auxwww|grep ntpd
> > root 36362  38.3  0.2 26192 18132  -  Ss   12:17AM0:04.73
> > /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift
> > root 36364   0.0  0.0 18844  2328  1  R+   12:17AM0:00.00 grep ntpd
> > root@vortex2:/etc/rc.d # grep command ntpd
> > command="/usr/local/sbin/${name}"
> > [...]
> >
> > So, asking as a port maintainer, a few questions:
> >
> > 0) Why the heck is it doing this even when I override the path?
> >
> > 1) How can we encourage base to allow override of command_name?
> >
> > 2) Is this a brokenness in the port that it doesn't ship with a startup 
> > file?
> >
> > 3) Not strictly related, but what's the proper case for pathing since things
> > like "ntpq", the base path would naturally be found in any standard $PATH.
> > Some ports used to have an overwrite_base option, but this also feels wrong
> > as it breaks freebsd-update in various ways.  I.e. should the port print a
> > message stating that you should chmod 000 the original binaries?  Should the
> > ports versions be named something different?  Should the port just warn you
> > that you need to call these things by absolute path, always?
> >
> > -Dan

Ping: cy

Why does net/ntp not include an rc(8) script or a pkg-message
describing how to activate it? It would go a long way if you could add
at least one of those things.

# Adam


-- 
Adam Weinberger
ad...@adamw.org
https://www.adamw.org
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Cannot specify ntpd binary in ports with ntpd startup file.

2018-08-30 Thread RW via freebsd-ports
On Tue, 28 Aug 2018 17:34:08 -0700 (PDT)
Dan Mahoney (Gushi) wrote:

> 1) Got the version wrong.  I'm on 10.4.
> 
> 2) Forgot a subject.  Whoops.
> 
> 3) Forgot to cc maintainer.  Doh!
> 
> -Dan
> 
> On Tue, 28 Aug 2018, Dan Mahoney (Gushi) wrote:
> 
> > Hey all,
> >
> > Funny question.  I'm on FreeBSD 11.4, and would like to use the
> > latest version of NTP, which is in pkg.

If you mean opennntp, that's not a later version, it's a different
implementation.

> > The version in pkg doesn't have a startup script, which I'm not
> > sure is supposed to be the case. 

My ports tree is a bit out of date, but it does appear to have a
startup script. Where you looking in /usr/local/etc/rc.d/?

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Cannot specify ntpd binary in ports with ntpd startup file.

2018-08-29 Thread Per olof Ljungmark
Hi,

On 8/29/18 2:34 AM, Dan Mahoney (Gushi) wrote:
> 1) Got the version wrong.  I'm on 10.4.
> 
> 2) Forgot a subject.  Whoops.
> 
> 3) Forgot to cc maintainer.  Doh!
> 
> -Dan
> 
> On Tue, 28 Aug 2018, Dan Mahoney (Gushi) wrote:
> 
>> Hey all,
>>
>> Funny question.  I'm on FreeBSD 11.4, and would like to use the latest
>> version of NTP, which is in pkg.
>>
>> The version in pkg doesn't have a startup script, which I'm not sure
>> is supposed to be the case.  I know for things like BIND (when it was
>> both in base and in ports) you could override the binary in /etc/rc.conf.
>>
>> However, the version of /etc/rc.d/ntpd in BASE doesn't seem to have
>> the ability to override the binary in rc.conf:
>>
>> name="ntpd"
>> rcvar="ntpd_enable"
>> command="/usr/sbin/${name}"
>> pidfile="/var/run/${name}.pid"
>> extra_commands="fetch"
>> fetch_cmd="ntpd_fetch_leapfile"
>> start_precmd="ntpd_precmd"
>>
>> What's weirder, is even if I manually modify the /etc/rc.d/ntpd file
>> to point at /usr/local/sbin (which I should never have to do), the
>> version in /usr/sbin gets started.
>>
>> root@vortex2:/etc/rc.d # service ntpd start
>> Starting ntpd.
>> root@vortex2:/etc/rc.d # ps auxwww|grep ntpd
>> root 36362  38.3  0.2 26192 18132  -  Ss   12:17AM    0:04.73
>> /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f
>> /var/db/ntpd.drift
>> root 36364   0.0  0.0 18844  2328  1  R+   12:17AM    0:00.00 grep
>> ntpd
>> root@vortex2:/etc/rc.d # grep command ntpd
>> command="/usr/local/sbin/${name}"
>> [...]
>>
>> So, asking as a port maintainer, a few questions:
>>
>> 0) Why the heck is it doing this even when I override the path?
>>
>> 1) How can we encourage base to allow override of command_name?
>>
>> 2) Is this a brokenness in the port that it doesn't ship with a
>> startup file?
>>
>> 3) Not strictly related, but what's the proper case for pathing since
>> things like "ntpq", the base path would naturally be found in any
>> standard $PATH. Some ports used to have an overwrite_base option, but
>> this also feels wrong as it breaks freebsd-update in various ways. 
>> I.e. should the port print a message stating that you should chmod 000
>> the original binaries?  Should the ports versions be named something
>> different?  Should the port just warn you that you need to call these
>> things by absolute path, always?
>>

I think you should post your /etc/rc.conf

There are lots of defaults in 11-STABLE which I run:

grep ntp defaults/rc.conf
ntpdate_enable="NO" # Run ntpdate to sync time on boot (or NO).
ntpdate_program="/usr/sbin/ntpdate" # path to ntpdate, if you want a
different one.
ntpdate_flags="-b"  # Flags to ntpdate (if enabled).
ntpdate_config="/etc/ntp.conf"  # ntpdate(8) configuration file
ntpdate_hosts=""# Whitespace-separated list of
ntpdate(8) servers.
ntpd_enable="NO"# Run ntpd Network Time Protocol (or NO).
ntpd_program="/usr/sbin/ntpd"   # path to ntpd, if you want a different one.
ntpd_config="/etc/ntp.conf" # ntpd(8) configuration file
ntpd_sync_on_start="NO" # Sync time on ntpd startup, even if
offset is high
ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntpd.drift"
# Flags to ntpd (if enabled).
ntp_src_leapfile="/etc/ntp/leap-seconds"
# Initial source for ntpd leapfile
ntp_db_leapfile="/var/db/ntpd.leap-seconds.list"
ntp_leapfile_sources="https://www.ietf.org/timezones/data/leap-seconds.list";
ntp_leapfile_fetch_opts="-mq"   # Options to use for ntp leapfile fetch,
ntp_leapfile_expiry_days=30 # Check for new leapfile 30 days prior to
ntp_leapfile_fetch_verbose="NO" # Be verbose during NTP leapfile fetch
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Cannot specify ntpd binary in ports with ntpd startup file.

2018-08-28 Thread Dan Mahoney (Gushi)

1) Got the version wrong.  I'm on 10.4.

2) Forgot a subject.  Whoops.

3) Forgot to cc maintainer.  Doh!

-Dan

On Tue, 28 Aug 2018, Dan Mahoney (Gushi) wrote:


Hey all,

Funny question.  I'm on FreeBSD 11.4, and would like to use the latest 
version of NTP, which is in pkg.


The version in pkg doesn't have a startup script, which I'm not sure is 
supposed to be the case.  I know for things like BIND (when it was both in 
base and in ports) you could override the binary in /etc/rc.conf.


However, the version of /etc/rc.d/ntpd in BASE doesn't seem to have the 
ability to override the binary in rc.conf:


name="ntpd"
rcvar="ntpd_enable"
command="/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
extra_commands="fetch"
fetch_cmd="ntpd_fetch_leapfile"
start_precmd="ntpd_precmd"

What's weirder, is even if I manually modify the /etc/rc.d/ntpd file to point 
at /usr/local/sbin (which I should never have to do), the version in 
/usr/sbin gets started.


root@vortex2:/etc/rc.d # service ntpd start
Starting ntpd.
root@vortex2:/etc/rc.d # ps auxwww|grep ntpd
root 36362  38.3  0.2 26192 18132  -  Ss   12:17AM0:04.73 
/usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift

root 36364   0.0  0.0 18844  2328  1  R+   12:17AM0:00.00 grep ntpd
root@vortex2:/etc/rc.d # grep command ntpd
command="/usr/local/sbin/${name}"
[...]

So, asking as a port maintainer, a few questions:

0) Why the heck is it doing this even when I override the path?

1) How can we encourage base to allow override of command_name?

2) Is this a brokenness in the port that it doesn't ship with a startup file?

3) Not strictly related, but what's the proper case for pathing since things 
like "ntpq", the base path would naturally be found in any standard $PATH. 
Some ports used to have an overwrite_base option, but this also feels wrong 
as it breaks freebsd-update in various ways.  I.e. should the port print a 
message stating that you should chmod 000 the original binaries?  Should the 
ports versions be named something different?  Should the port just warn you 
that you need to call these things by absolute path, always?


-Dan




--

"No mowore webooting!!!"

-Paul, 10-16-99, 10 PM

Dan Mahoney
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"