Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Sep 2018 09:58:40 +0000
From:      Lorenzo Salvadore <phascolarctos@protonmail.ch>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Starting ntpd in a jail
Message-ID:  <qVy17oFNtrzjhGPT1-jC_7ahfDknjerFoAXftsFW6GPxLvNdXRi9ZOhW79BulsmFcq7u5UEnjDPyTfPtgUajVH4ZggaMZ4vydlwwbGjZChM=@protonmail.ch>
In-Reply-To: <e2f617fb-3623-c980-63cf-dc37d979e6c6@netfence.it>
References:  <8a138f2e-11d4-d890-c28d-72717a9eed3a@netfence.it> <TrSP3YZF4e5ZkZHxwQSfaGbN-4Q0EJp0BmWBs_EOeP59WvyVBsUv2xjBTio7C6Mf-CrK-Yw6dSXd0BAQRQTR5kN_uxCbjGGPadevGNYYQA4=@protonmail.ch> <e2f617fb-3623-c980-63cf-dc37d979e6c6@netfence.it>

next in thread | previous in thread | raw e-mail | index | archive | help

> > 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.

Lorenzo Salvadore.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?qVy17oFNtrzjhGPT1-jC_7ahfDknjerFoAXftsFW6GPxLvNdXRi9ZOhW79BulsmFcq7u5UEnjDPyTfPtgUajVH4ZggaMZ4vydlwwbGjZChM=>