Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/jail/jail.8
Show All 19 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd April 17, 2020 | .Dd May 14, 2020 | ||||
.Dt JAIL 8 | .Dt JAIL 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm jail | .Nm jail | ||||
.Nd "manage system jails" | .Nd "manage system jails" | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl dhilqv | .Op Fl dhilqv | ||||
▲ Show 20 Lines • Show All 684 Lines • ▼ Show 20 Lines | |||||
command lines that are run in either the system or jail environment. | command lines that are run in either the system or jail environment. | ||||
They may be given multiple values, which would run the specified | They may be given multiple values, which would run the specified | ||||
commands in sequence. | commands in sequence. | ||||
All commands must succeed (return a zero exit status), or the jail will | All commands must succeed (return a zero exit status), or the jail will | ||||
not be created or removed, as appropriate. | not be created or removed, as appropriate. | ||||
.Pp | .Pp | ||||
The pseudo-parameters are: | The pseudo-parameters are: | ||||
.Bl -tag -width indent | .Bl -tag -width indent | ||||
.It Va exec.prepare | |||||
Command(s) to run in the system environment to prepare a jail for creation. | |||||
These commands are executed before assigning IP addresses and mounting | |||||
filesystems, so they may be used to create a new jail filesystem if it does | |||||
not already exist. | |||||
.It Va exec.prestart | .It Va exec.prestart | ||||
Command(s) to run in the system environment before a jail is created. | Command(s) to run in the system environment before a jail is created. | ||||
.It Va exec.created | .It Va exec.created | ||||
Command(s) to run in the system environment right after a jail has been | Command(s) to run in the system environment right after a jail has been | ||||
created, but before commands (or services) get executed in the jail. | created, but before commands (or services) get executed in the jail. | ||||
.It Va exec.start | .It Va exec.start | ||||
Command(s) to run in the jail environment when a jail is created. | Command(s) to run in the jail environment when a jail is created. | ||||
A typical command to run is | A typical command to run is | ||||
Show All 18 Lines | |||||
Command(s) to run in the jail environment before a jail is removed, | Command(s) to run in the jail environment before a jail is removed, | ||||
and after any | and after any | ||||
.Va exec.prestop | .Va exec.prestop | ||||
commands have completed. | commands have completed. | ||||
A typical command to run is | A typical command to run is | ||||
.Dq sh /etc/rc.shutdown jail . | .Dq sh /etc/rc.shutdown jail . | ||||
.It Va exec.poststop | .It Va exec.poststop | ||||
Command(s) to run in the system environment after a jail is removed. | Command(s) to run in the system environment after a jail is removed. | ||||
.It Va exec.release | |||||
Command(s) to run in the system environment after all other actions are done. | |||||
These commands are executed after unmounting filesystems and removing IP | |||||
addresses, so they may be used to remove a jail filesystem if it is no longer | |||||
needed. | |||||
.It Va exec.clean | .It Va exec.clean | ||||
Run commands in a clean environment. | Run commands in a clean environment. | ||||
The environment is discarded except for | The environment is discarded except for | ||||
.Ev HOME , SHELL , TERM | .Ev HOME , SHELL , TERM | ||||
and | and | ||||
.Ev USER . | .Ev USER . | ||||
.Ev HOME | .Ev HOME | ||||
and | and | ||||
▲ Show 20 Lines • Show All 639 Lines • Show Last 20 Lines |