How to define the order of starting jails?
Michael Grimm
trashcan at ellael.org
Sun Dec 20 20:57:34 UTC 2015
dweimer <dweimer at dweimer.net> wrote:
> On 2015-12-20 1:25 pm, Michael B. Eichorn wrote:
>> On Sun, 2015-12-20 at 17:50 +0100, Michael Grimm wrote:
[starting sequence definition, how to?]
>>> Thus, I might have overlooked it, is there a way to achieve my goal
>>> using jail and jail.conf?
>>> Or something else?
>> jail(8)'s '*' operates on everything without concern for rc.conf, as
>> such jail_list is not respected. Perhaps try something tied to the rc.d
>> system. Does `service jail restart` do what you are looking for?
>> Otherwise I would just go with simple restart script such as:
>> #!/bin/sh
>> set -e
>> jail -r '*'
>> jail -c dns
>> jail -c mail
>
> You can also define a jail dependency to make sure a jail starts before another one
>
> dns {
> ...
> }
> mail {
> ...
> depend = "dns"
> }
Yep! That is working as well. And, now it will stop jails in the reverse order.
*BUT*, that doesn't work with "jail -rc '*'", reproducibly …
| testing> jail -rc '*'
| ifconfig: : bad value
| jail: dns: /sbin/ifconfig em0 inet netmask 255.255.255.255 @ alias: failed
… and leaving me with all stopped but not started a single jail :-(
"service jail restart" works much better, never failing.
Thanks and with kind regards,
Michael
More information about the freebsd-questions
mailing list