freebsd-skq/usr.sbin/jail
Ryan Moeller 66005c453d jail: Add exec.prepare and exec.release command hooks
This change introduces new jail command hooks that run before and after any
other actions.

The exec.prepare hook can be used for example to invoke a script that checks
if the jail's root exists, creating it if it does not. Since arbitrary
variables in jail.conf can be passed to the command, it can be pretty useful
for templating jails.

An example use case for exec.release would be to remove the filesystem of an
ephemeral jail.

The names "prepare" and "release" are borrowed from the names of similar hooks
in libvirt.

Reviewed by:	jamie, manpages, mmacy
Approved by:	mmacy (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D24829
2020-05-14 23:38:11 +00:00
..
tests [jail] removal by jid doesn't trigger pre/post stop scripts 2019-09-12 18:53:29 +00:00
command.c jail: Add exec.prepare and exec.release command hooks 2020-05-14 23:38:11 +00:00
config.c jail: Add exec.prepare and exec.release command hooks 2020-05-14 23:38:11 +00:00
jail.8 jail: Add exec.prepare and exec.release command hooks 2020-05-14 23:38:11 +00:00
jail.c jail: Add exec.prepare and exec.release command hooks 2020-05-14 23:38:11 +00:00
jail.conf.5 add ability to set watchdog timeout for a shutdown 2019-10-03 11:23:10 +00:00
jaillex.l Stop linking to libl by specifying we do not need yywrap 2019-09-10 07:25:37 +00:00
jailp.h jail: Add exec.prepare and exec.release command hooks 2020-05-14 23:38:11 +00:00
jailparse.y various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
Makefile revert r354935 and apply fix for cleandir failure 2019-11-21 13:56:16 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
state.c [jail] removal by jid doesn't trigger pre/post stop scripts 2019-09-12 18:53:29 +00:00