appjail-start
—
Start a stopped jail
appjail start |
[-I ] [-t
template] jail |
appjail start |
[-i initscript]
[[-c parameter=value] ...]
[[-s parameter=value] ...]
[-t template]
[[-V name=value] ...]
jail |
The
appjail
start utility starts a jail and is responsible for performing many
operations:
- Lock the jail to avoid starting it twice by a second process while doing
this operation on the first.
- Start a given jail.
- Start other jails on which it depends.
- Execute the create and start
stages.
- Check the template for syntax errors.
- Warns the user about required parameters that are not yet configured in
the template.
- Load DEVFS rules that were created using
appjail-devfs(1).
- Configure parameters that were not defined in the
template file, such as
exec.consolelog,
mount.fstab,
host.hostname.
- Stop a failed jail.
The options are as follows:
-c
parameter=value ...
- Parameters for pre-, post- and
create functions passed with syntax such as
parameter1=value1,
parameter2=value=2, ...,
parameterN=valueN. If no parameters are provided
from the command-line, they will be obtained via
appjail-enabled(1).
-i
initscript
- Pathname to the InitScript. If no
InitScript is provided from the command-line, it will be
obtained via
appjail-enabled(1).
If not defined there, the InitScript located in the root
directory of the jail is used if it exists and has the execute bit
permission.
-I
- Avoid running the InitScript.
appjail-enable(1)
and
appjail-disable(1)
affects this parameter when it is not specified explicitly from the
command-line.
-s
parameter=value ...
- Parameters for pre-, post- and
start functions passed with syntax such as
parameter1=value1,
parameter2=value=2, ...,
parameterN=valueN. If no parameters are provided
from the command-line, they will be obtained via
appjail-enabled(1).
-t
template
- Pathname to the template file. If not specified, the template is retrieved
from
appjail-enabled(1)
and if it does not have a pathname to the template, the default one found
in the root directory of the jail is used, and if it does not exist, the
default template specified in the
DEFAULT_TEMPLATE
parameter is used.
-V
name=value
- Environment variables. Environment variables are defined internally with a
syntax such as
__APPJAIL_RUN_ENVIRONMENT_VAR__<name>=<value>
and validated with a regular expression such as
^__APPJAIL_RUN_ENVIRONMENT_VAR__[a-zA-Z_][a-zA-Z0-9_]*(=.*)?$.
The appjail start
utility exits 0
on success, and >0 if an error occurs. It may fail for one of the
following reasons:
- EX_USAGE:
The command was used incorrectly.
- EX_DATAERR:
- An invalid environment variable was specified.
- jail is invalid.
- The log name specified in the
CONSOLELOG_NAME
parameter is invalid.
- EX_NOINPUT:
- jail cannot be found.
- The template file specified with
-t
cannot be
found.