Starting ntpd in a jail
phascolarctos at protonmail.ch
Sat Sep 29 09:58:52 UTC 2018
> > Please give details on your jail configuration: do you manage it by writing
> > directly into /etc/jail.conf? do you use some utility like ezjail?
> Sorry, I should have said it at the start: I'm using ezjail.
> Of course I have ntpd_enable="YES".
I do not use ezjail, hence I can not help you much. Hopefully, someonelse
will help you more, but in the meantime I will try.
I think your problem might be in the moment at which /bin/sh /etc/rc is executed.
As you probably know, there is a difference between creating a jail and entering
a jail (a jail might run without being used by anybody). In my configuration,
the line exec.start="/bin/sh /etc/rc" asks to start the services only when the jail is
created and they will not start again if I exit from the jail and enter again into it
without destroying and recreating the jail.
Now, I think you could be in one of the following situations (or maybe both):
1) when you start your jail through ezjail, what you are really doing is entering
in an already created jail and hence services are not started; in that case, it might be
that ntpd starts regularly if you reboot your system or restart the ezjail service (I think
it is a service);
2) ezjail creates your jail at boot before everything needed by ntpd is set properly, so
ntpd fails at start and when you enter into the jail there is no ntpd: you could
check if that is the case by reading into the logs. In that case the solution would be to
reorder the host's services.
I hope it helps.
More information about the freebsd-questions