Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2019 18:28:48 +0200
From:      Luca Pizzamiglio <pizzamig@freebsd.org>
To:        jail@freebsd.org
Subject:   Defaults in jail.conf not applied if jail block is not existing
Message-ID:  <CAB88xy9Vw%2BXzw7hAg_6i=bo6TUSXoBAvE6DXe_iCo=N2Nm3Wjw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I have 2 silly questions and I think I know the answer.
I'd like to use the command line jail tool start and configure my jails;
however, I'd like to have defaults set up in a central place.

I thought I could put those defaults in /etc/jail.conf and then dynamically
create my jails with the cli tool.
However, if the jail create (or stop) is not explicitly listed in
jail.conf, the defaults are not applied.
If I add an empty configuration block, then the default values are applied.

Is this an intended behavior?

The second question is about not persistent jails.
Once all processes in the jail exits, the jail is automatically destroyed.
However, without invoking jail -r , there is no way (that I'm aware of) to
invoke a poststop script automatically.
Is there a workaround or a suggested way to have a callback/script invoked
when a jail disappear? (currently, I'm not happily considering a cronjob as
a solution)

Thanks in advance for the support!

Best regards.
pizzamig@



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB88xy9Vw%2BXzw7hAg_6i=bo6TUSXoBAvE6DXe_iCo=N2Nm3Wjw>