HomeFreeBSD

jail: add JID, JNAME and JPATH to environment for exec.* commands

Description

jail: add JID, JNAME and JPATH to environment for exec.* commands

Although variable substitution is available in the jail configuration
file, the jail identifier is often not since it is dynamically
attributed at run time.

In order to facilitate scripting of exec.* commands executed on the
system, this change sets the JID, JNAME and JPATH environment variables.

These variables are not added when using exec.clean. Neither are they
for commands executed inside jails, to avoid disclosing information
about the host system.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1609
Closes: https://github.com/freebsd/freebsd-src/pull/1609

Details

Provenance
quentin.thebault_defenso.frAuthored on Mar 5 2025, 9:51 AM
impCommitted on Jun 13 2025, 1:21 AM
Parents
rG754bc3dcd3c4: bsdinstall: fix ps3 regression
Branches
Unknown
Tags
Unknown