Best way to start pkg daemons that don't come with their own rc script

Anton Sayetsky vsasjason at gmail.com
Thu Dec 17 14:03:49 UTC 2015


17 дек. 2015 г. 15:59 пользователь "Doug McIntyre" <merlyn at geeks.org>
написал:
>
> So, for the concrete example.
>
> FreeBSD10.2
> I want to run ntp-devel
>
> So I install it out of pkg and it goes into /usr/local.
>
> But it doesn't supply a /usr/local/etc/rc.d/ntpd rc script.
> Presumably because /etc/rc.d/ntpd already exists for the system
> installed ntpd.
>
> What I tried was to move the ntpd rc out of /etc into /usr/local/etc
> and change the 'command' to /usr/local/sbin/${name}
>
> BUT, the rc.subr code pretty much overrides that to run /usr/sbin/${name}
> anyway.
>
> Since ntpd is part of the base system, I feel stymied.
>
> I did a hack to make it work.
>
> But what would be the "proper FreeBSD way" to have the rc script run
> the right binary here?
If you need to run software that is installed from ports and exists in the
base too, take a look at /etc/defaults/rc.conf. For example, you should
only add ntpd_program="/usr/local/sbin/ntpd" in rc.conf.


More information about the freebsd-questions mailing list