Learned groff (a little) and beautified the man page.
This commit is contained in:
parent
6179ac6590
commit
b5f4cc892a
@ -4,34 +4,26 @@ ezjail-admin \- Administrate ezjail
|
|||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.T
|
.T
|
||||||
.B ezjail-admin create
|
.B ezjail-admin create
|
||||||
[-f flavour] [-r jailroot] [-s imagesize] [-ibx] [-c bde|eli] [-C attachargs]
|
[-f flavour] [-r jailroot] [-s imagesize] [-ibx] [-c bde|eli] [-C attachargs]\fI hostname jailip
|
||||||
.I hostname jailip
|
|
||||||
|
|
||||||
.T
|
.T
|
||||||
.B ezjail-admin delete
|
.B ezjail-admin delete \fR[-w] \fI hostname
|
||||||
[-w]
|
|
||||||
.I hostname
|
|
||||||
|
|
||||||
.T
|
.T
|
||||||
.B ezjail-admin list
|
.B ezjail-admin list
|
||||||
|
|
||||||
.T
|
.T
|
||||||
.B ezjail-admin config
|
.B ezjail-admin config\fR [-r run|norun] [-n newname] [-i attach|detach]\fI jailname
|
||||||
[-r run|norun] [-n newname] [-i attach|detach]
|
|
||||||
.I jailname
|
|
||||||
|
|
||||||
.T
|
.T
|
||||||
.B ezjail-admin install
|
.B ezjail-admin install\fR [-mps] [-h host] [-r release]
|
||||||
[-mps] [-h host] [-r release]
|
|
||||||
|
|
||||||
.T
|
.T
|
||||||
.B ezjail-admin update
|
.B ezjail-admin update\fR [-s sourcetree] [-i] [-pP]
|
||||||
[-s sourcetree] [-i] [-pP]
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The
|
The \fB ezjail-admin\fR tool is used to manage jails inside the ezjail
|
||||||
.B ezjail-admin
|
scope. It is not used to start or stop ezjails jails. Refer to \fIezjail(5)\fR
|
||||||
tool is used to manage jails inside the ezjail scope. It is not used
|
for more details.
|
||||||
to start or stop ezjails jails. Refer to ezjail(5) for more details.
|
|
||||||
.SH ezjail-admin create
|
.SH ezjail-admin create
|
||||||
copies the template jail to the root of a new jail, whose name and IP
|
copies the template jail to the root of a new jail, whose name and IP
|
||||||
address are provided as mandatory parameters.
|
address are provided as mandatory parameters.
|
||||||
@ -39,17 +31,13 @@ address are provided as mandatory parameters.
|
|||||||
If no jail root is specified via the -r option, it is derived from
|
If no jail root is specified via the -r option, it is derived from
|
||||||
the jails name. In this case or, if a jail root is given and does not
|
the jails name. In this case or, if a jail root is given and does not
|
||||||
start with a '/', it is interpreted relative to ezjails root dir
|
start with a '/', it is interpreted relative to ezjails root dir
|
||||||
(default:
|
(default: \fI/usr/jails\fR). If a specified jail root lies outside
|
||||||
.I /usr/jails
|
ezjail root dir, a soft link is created inside this root dir pointing
|
||||||
). If a specified jail root lies outside ezjail root dir, a soft link
|
to the newly created jails location.
|
||||||
is created inside this root dir pointing to the newly created jails
|
|
||||||
location.
|
|
||||||
|
|
||||||
The -i and the -c option both require a size passed via the -s option
|
The -i and the -c option both require a size passed via the -s option
|
||||||
and create a file based jail image, gbde or geli encrypted for the -c
|
and create a file based jail image, gbde or geli encrypted for the -c
|
||||||
case. The image file is named as the jail root suffixed with
|
case. The image file is named as the jail root suffixed with \fI.img\fR.
|
||||||
.I .img
|
|
||||||
.
|
|
||||||
|
|
||||||
The -x (jail exists) option indicates, that an ezjail already exists
|
The -x (jail exists) option indicates, that an ezjail already exists
|
||||||
at the jail root.
|
at the jail root.
|
||||||
@ -58,30 +46,20 @@ This is useful in situations where you just want to alter some of a
|
|||||||
jail properties and called ezjail-admin delete without the -w option
|
jail properties and called ezjail-admin delete without the -w option
|
||||||
before. However, sanity checks are being performed.
|
before. However, sanity checks are being performed.
|
||||||
|
|
||||||
The script creates an entry in its config and a
|
The script creates an entry in its config and a \Fi/etc/fstab.hostname\fR
|
||||||
.I /etc/fstab.hostname
|
|
||||||
file allowing the jail to be brought up after next reboot (or) via
|
file allowing the jail to be brought up after next reboot (or) via
|
||||||
the EZJAIL_PREFIX/etc/rc.d/ezjail.sh script.
|
the EZJAIL_PREFIX/etc/rc.d/ezjail.sh script.
|
||||||
|
|
||||||
The newly created jail can perform some initializiation actions, if the
|
The newly created jail can perform some initializiation actions, if the
|
||||||
-f
|
-f \fIflavour\fR option is given, where \fIflavour\fR is a directory tree
|
||||||
.I flavour
|
under ezjails root dir (default: \fI/usr/jails/flavours\fR). See section
|
||||||
option is given, where
|
\fBFLAVOURS\fR below for more details.
|
||||||
.I flavour
|
|
||||||
is a directory tree under ezjails root dir (default:
|
|
||||||
.I /usr/jails/flavours
|
|
||||||
). See section
|
|
||||||
.B FLAVOURS
|
|
||||||
below for more details.
|
|
||||||
|
|
||||||
Options for newly created jails are read from
|
Options for newly created jails are read from \fBezjail.conf\fR, refer to
|
||||||
.B ezjail.conf,
|
ezjail.conf(5) for more information.
|
||||||
refer to ezjail.conf(5) for more information.
|
|
||||||
.SH ezjail-admin delete
|
.SH ezjail-admin delete
|
||||||
removes a jail from ezjails config and the corresponding
|
removes a jail from ezjails config and the corresponding \fI/etc/fstab.hostname\fR
|
||||||
.I /etc/fstab.hostname
|
file, thus preventing the jail from being brought up on next reboot.
|
||||||
file, thus preventing the jail from being brought
|
|
||||||
up on next reboot.
|
|
||||||
|
|
||||||
If the -w (wipe) option is given, the directory pointed to by the jail
|
If the -w (wipe) option is given, the directory pointed to by the jail
|
||||||
root entry is removed as well as the soft link in ezjails root dir.
|
root entry is removed as well as the soft link in ezjails root dir.
|
||||||
@ -89,28 +67,13 @@ root entry is removed as well as the soft link in ezjails root dir.
|
|||||||
lists all jails inside ezjails scope. They are sorted by the order they
|
lists all jails inside ezjails scope. They are sorted by the order they
|
||||||
start up, as defined by rcorder. The list format is straight forward.
|
start up, as defined by rcorder. The list format is straight forward.
|
||||||
|
|
||||||
A status flag consisting of 2 or 3 letters, the first meaning
|
A status flag consisting of 2 or 3 letters, the first meaning \fB(D)irectory\fR
|
||||||
.B (D)irectory
|
based, \fB(I)mage\fR based, \fB(B)de\fR crypto image based, \fB(E)li\fR crypto
|
||||||
based,
|
image based. The second one meaning \fB(R)unning\fR, \fB(A)ttached\fR but not
|
||||||
.B (I)mage
|
running, \fB(S)topped\fR. An optional \fB(N)orun\fR stands for disabled jails (see
|
||||||
based,
|
\fIezjail-admin config\fR).
|
||||||
.B (B)de
|
|
||||||
crypto image based,
|
|
||||||
.B (E)li
|
|
||||||
crypto image based. The second one meaning
|
|
||||||
.B (R)unning
|
|
||||||
,
|
|
||||||
.B (A)ttached
|
|
||||||
but not running,
|
|
||||||
.B (S)topped
|
|
||||||
. An optional
|
|
||||||
.B (N)orun
|
|
||||||
stands for disabled jails (see
|
|
||||||
.I ezjail-admin config
|
|
||||||
).
|
|
||||||
|
|
||||||
Rest of the row is follow by jails jid (if available), its IP, hostname
|
Rest of the row is jails jid (if available), its IP, hostname and root directory.
|
||||||
and root directory.
|
|
||||||
.SH ezjail-admin config
|
.SH ezjail-admin config
|
||||||
manages existing specific ezjails.
|
manages existing specific ezjails.
|
||||||
|
|
||||||
@ -128,10 +91,9 @@ an attached jail.
|
|||||||
fetches everything needed to setup a base jail from an FTP server and
|
fetches everything needed to setup a base jail from an FTP server and
|
||||||
installs it.
|
installs it.
|
||||||
|
|
||||||
Default location for ezjails base jail is
|
Default location for ezjails base jail is \fI/usr/jails\fR, so be sure you
|
||||||
.I /usr/jails
|
have enough space there (a FreeBSD base without man pages, sources and ports
|
||||||
, so be sure you have enough space there (a FreeBSD base without man
|
is around 120MB).
|
||||||
pages, sources and ports is around 120MB).
|
|
||||||
|
|
||||||
The -m and -s option will fetch and install man pages (ca. 10MB) and
|
The -m and -s option will fetch and install man pages (ca. 10MB) and
|
||||||
sources packages (ca. 450MB) respectively. The -p option invokes the
|
sources packages (ca. 450MB) respectively. The -p option invokes the
|
||||||
@ -149,60 +111,45 @@ If the specified location begins with file://, your local copy of the
|
|||||||
release is used. That way you can do some modifications to install.sh
|
release is used. That way you can do some modifications to install.sh
|
||||||
scripts before executing them.
|
scripts before executing them.
|
||||||
|
|
||||||
You can later update your world from CVS or update ports by
|
You can later update your world from CVS or update ports by \fIezjail-admin
|
||||||
.U ezjail-admin update
|
update\fR or rerun this subcommand with another OS version.
|
||||||
or rerun this subcommand with another OS version.
|
|
||||||
.SH ezjail-admin update
|
.SH ezjail-admin update
|
||||||
creates or update ezjails basejail. Depending on the parameters
|
creates or update ezjails basejail. Depending on the parameters
|
||||||
given it will install a FreeBSD system from a source tree whose location
|
given it will install a FreeBSD system from a source tree whose location
|
||||||
is either provided in the
|
is either provided in the \fBezjail.conf\fR config file or via the -s option.
|
||||||
.B ezjail.conf
|
|
||||||
config file or via the -s option.
|
|
||||||
|
|
||||||
If the -p or -P options are given, the base jail also is given a copy of
|
If the -p or -P options are given, the base jail also is given a copy of
|
||||||
FreeBSDs ports tree, which is in turn linked into all newly created
|
FreeBSDs ports tree, which is in turn linked into all newly created
|
||||||
ezjails. The portsnap utility is invoked to do the actual work.
|
ezjails. The portsnap utility is invoked to do the actual work.
|
||||||
|
|
||||||
If the -P option is given,
|
If the -P option is given, \fBonly the ports tree will be updated,\fR this can
|
||||||
.B only the ports tree will be updated,
|
be done, while jails are running.
|
||||||
this can be done, while jails are running.
|
|
||||||
|
|
||||||
If the -i (install only) option is given,
|
If the -i (install only) option is given, \fBezjail-admin update\fR only
|
||||||
.B ezjail-admin update
|
performes a \fImake installworld,\fR otherwise \fImake world\fR is invoked.
|
||||||
only performes a
|
|
||||||
.I make installworld,
|
|
||||||
otherwise
|
|
||||||
.I make world
|
|
||||||
is invoked.
|
|
||||||
|
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
.B ezjail-admin update
|
.B ezjail-admin update\fR uses a temporary directory to install its world to,
|
||||||
uses a temporary directory to install its world to, thus leaving intact
|
thus leaving intact all installed libraries, if a base jail already exists.
|
||||||
all installed libraries, if a base jail already exists.
|
|
||||||
|
|
||||||
When using the
|
When using the \fBezjail-admin update\fR option, be careful to use the same
|
||||||
.B ezjail-admin update
|
FreeBSD source tree used to build the host systems world, or at least its
|
||||||
option, be careful to use the same FreeBSD source tree used to build the
|
kernel. Combining a make world in the host system with \fBezjail-admin update\fR
|
||||||
host systems world, or at least its kernel. Combining a make world in the
|
|
||||||
host system with
|
|
||||||
.B ezjail-admin update
|
|
||||||
is considered a good idea.
|
is considered a good idea.
|
||||||
|
|
||||||
When a ports tree exists in base jail, a make.conf containing reasonable
|
When a ports tree exists in base jail, a make.conf containing reasonable
|
||||||
values for having ports in jails is created in the template jail.
|
values for having ports in jails is created in the template jail.
|
||||||
.SH FLAVOURS
|
.SH FLAVOURS
|
||||||
.B ezjail-admin
|
.B ezjail-admin\fR provides an easy way to create many jails with similar or
|
||||||
provides an easy way to create many jails with similar or identical
|
identical properties.
|
||||||
properties.
|
|
||||||
|
|
||||||
A sample flavour config directory resides under
|
A sample flavour config directory resides under
|
||||||
.I EZJAIL_PREFIX/share/examples/ezjail/default/.
|
.I EZJAIL_PREFIX/share/examples/ezjail/default/.\fR Some typical Jail
|
||||||
Some typical Jail initialization actions are demonstrated and you are
|
initialization actions are demonstrated and you are encouraged to use it as a
|
||||||
encouraged to use it as a template for your flavours.
|
template for your flavours.
|
||||||
|
|
||||||
If a flavour is selected on jail creation, the flavour root is being
|
If a flavour is selected on jail creation, the flavour root is being
|
||||||
copied to the new Jails root, mostly containing an
|
copied to the new Jails root, mostly containing an \fI/ezjail.flavour\fR.
|
||||||
.I /ezjail.flavour .
|
|
||||||
If the Jail starts up for the first time this script is run.
|
If the Jail starts up for the first time this script is run.
|
||||||
|
|
||||||
In its default form it will create some groups and users, change the
|
In its default form it will create some groups and users, change the
|
||||||
|
@ -11,44 +11,24 @@ effort and aims for minimum system resource usage.
|
|||||||
If you are not familiar with the FreeBSD jail concept, please refer to
|
If you are not familiar with the FreeBSD jail concept, please refer to
|
||||||
jail(8) before continuing.
|
jail(8) before continuing.
|
||||||
.SH OVERVIEW
|
.SH OVERVIEW
|
||||||
One
|
One \fIbase jail\fR is filled with most userland binaries and libraries and
|
||||||
.I base jail
|
then mounted read only into a number of stripped down jails via
|
||||||
is filled with most userland binaries and libraries and then mounted
|
.B mount_nullfs(8)\fR - thus saving lots of inodes and memory resources.
|
||||||
read only into a number of stripped down jails via
|
|
||||||
.B mount_nullfs(8)
|
|
||||||
- thus saving lots of inodes and memory resources.
|
|
||||||
.SH INVOCATION
|
.SH INVOCATION
|
||||||
The ezjail script
|
The ezjail script \fBEZJAIL_PREFIX/etc/rc.d/ezjail.sh\fR takes parameters \fIstart,
|
||||||
.B EZJAIL_PREFIX/etc/rc.d/ezjail.sh
|
startcrypto, restart\fR and \fIstop\fR. It may be passed an additional list of
|
||||||
takes parameters
|
jails. If no jail name is specified (usually when the script is being called by
|
||||||
.I start, startcrypto, restart
|
rc.local at boot and shutdown time), all jails in ezjails scope, except crypto
|
||||||
and
|
image jails (or jails marked as blocking), are being started/stopped. To start
|
||||||
.I stop.
|
all crytpo image jails (or those depending on them), use the \fIstartcrypto\fR parameter.
|
||||||
It may be passed an additional list of jails. If no jail name is
|
|
||||||
specified (usually when the script is being called by rc.local at boot
|
|
||||||
and shutdown time), all jails in ezjails scope, except crypto image
|
|
||||||
jails (or jails marked as blocking), are being started/stopped. To
|
|
||||||
start all crytpo image jails (or those depending on them), use the
|
|
||||||
.I startcrypto
|
|
||||||
parameter.
|
|
||||||
|
|
||||||
The script examines its config, attaches and mounts images, sets
|
The script examines its config, attaches and mounts images, sets
|
||||||
variables for each jail in the jail_list before passing its command on
|
variables for each jail in the jail_list before passing its command on
|
||||||
to the
|
to the \fB/etc/rc.d/jail\fR script.
|
||||||
.B /etc/rc.d/jail
|
|
||||||
script.
|
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
.B ezjail.sh
|
.B ezjail.sh\fR enforces the execution of \fB/etc/rc.d/jail\fR, by
|
||||||
enforces the execution of
|
prepending \fI"one"\fR to the start, restart and stop commands so it is
|
||||||
.B /etc/rc.d/jail,
|
.B NOT NECESSARY\fR to set \fIjail_enable\fR in the \fB/etc/rc.conf\fR
|
||||||
by prepending
|
|
||||||
.I "one"
|
|
||||||
to the start, restart and stop commands so it is
|
|
||||||
.B NOT NECESSARY
|
|
||||||
to set
|
|
||||||
.I jail_enable
|
|
||||||
in the
|
|
||||||
.B /etc/rc.conf
|
|
||||||
config file.
|
config file.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
EZJAIL_PREFIX/etc/ezjail.conf
|
EZJAIL_PREFIX/etc/ezjail.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user