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