summaryrefslogtreecommitdiff
path: root/man1
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2008-07-08 18:45:24 +0000
committererdgeist <erdgeist@erdgeist.org>2008-07-08 18:45:24 +0000
commit51c6072cb8ca2eefd79d076146f099f0cebb0450 (patch)
tree5030cf4bfb874b1628d77e9c1814c9bd18f66dcb /man1
parent9060c450c5a77a6313a8d3b54e643413d863396d (diff)
Fix typos and add lots of documentation.
Diffstat (limited to 'man1')
-rwxr-xr-xman1/ezjail-admin.1163
1 files changed, 96 insertions, 67 deletions
diff --git a/man1/ezjail-admin.1 b/man1/ezjail-admin.1
index a796f00..8cba99d 100755
--- a/man1/ezjail-admin.1
+++ b/man1/ezjail-admin.1
@@ -3,11 +3,14 @@
3ezjail-admin \- Administrate ezjail 3ezjail-admin \- Administrate ezjail
4.SH SYNOPSIS 4.SH SYNOPSIS
5.T 5.T
6.B ezjail-admin install\fR [-mps] [-h host] [-r release]
7
8.T
6.B ezjail-admin create 9.B ezjail-admin create
7[-f flavour] [-r jailroot] [-s imagesize] [-ibx] [-c bde|eli] [-C attachargs] [-a archive]\fI hostname jailip 10[-f flavour] [-r jailroot] [-s imagesize] [-ibx] [-c bde|eli] [-C attachargs] [-a archive]\fI hostname jailip
8 11
9.T 12.T
10.B ezjail-admin delete \fR[-w] \fI hostname 13.B ezjail-admin console\fR [-f] [-e command]\fI jailname
11 14
12.T 15.T
13.B ezjail-admin list 16.B ezjail-admin list
@@ -16,27 +19,59 @@ ezjail-admin \- Administrate ezjail
16.B ezjail-admin config\fR [-r run|norun] [-n newname] [-i attach|detach|fsck]\fI jailname 19.B ezjail-admin config\fR [-r run|norun] [-n newname] [-i attach|detach|fsck]\fI jailname
17 20
18.T 21.T
19.B ezjail-admin console\fR [-f] [-e command]\fI jailname 22.B ezjail-admin delete \fR[-w] \fI hostname
20 23
21.T 24.T
22.B ezjail-admin archive\fR [-Af] [-a archive] [-d archivedir]\fI [jailname...] 25.B ezjail-admin archive\fR [-Af] [-a archive] [-d archivedir]\fI [jailname...]
23 26
24.T 27.T
25.B ezjail-admin install\fR [-mps] [-h host] [-r release] 28.B ezjail-admin restore\fR [-f] [-d archivedir]\fI (archive|jailname)...
26 29
27.T 30.T
28.B ezjail-admin update\fR [-s sourcetree] [-i] [-pP] 31.B ezjail-admin update\fR [-s sourcetree] [-i] [-pP]
32
29.SH DESCRIPTION 33.SH DESCRIPTION
30The \fB ezjail-admin\fR tool is used to manage jails inside the ezjail 34The \fBezjail-admin\fR tool is used to manage the ezjail environment
31scope. 35and jails inside the ezjail scope.
32 36
33It can also be used to start or stop and to get a console in ezjails 37It can also be used to start or stop and to get a console in ezjails
34jails by proxying everything looking like 38jails by proxying everything looking like
35\fBezjail-admin start\fR, \fBstop\fR or \fBrestart\fR to the ezjail rc.d script. 39\fBezjail-admin start\fR, \fBstop\fR or \fBrestart\fR to the ezjail rc.d script.
40.SH ezjail-admin install
41fetches everything needed to setup an ezjail environment from an FTP server and
42installs it.
43
44Default location for ezjails base jail is \fI/usr/jails\fR, so be sure you
45have enough space there (a FreeBSD base without man pages, sources and ports
46is around 120MB).
47
48The -m and -s option will fetch and install man pages (ca. 10MB) and
49sources packages (ca. 450MB) respectively. The -p option invokes the
50portsnap utility to fetch and extract a FreeBSD ports tree (ca. 475MB).
51
52Default OS version is, whatever uname -r returns. If this does not match
53"*-RELEASE", you will be prompted for a better guess. (Normally
54ftp-servers do not provide release candidates or CURRENT builds). You can
55use the -r option to specify a release from command line.
56
57Default host to fetch packages from is ftp.freebsd.org, you may want to
58change this via the -h option or in ezjail.conf(5).
59
60If the specified location begins with file://, your local copy of the
61release is used. That way you can do some modifications to install.sh
62scripts before executing them.
63
64You can later update your world from CVS or update ports by \fIezjail-admin
65update\fR or rerun this subcommand with another OS version.
36.SH ezjail-admin create 66.SH ezjail-admin create
37copies the template jail to the root of a new jail, whose name and IP 67installs a new jail inside ezjails scope. It either copies the template
68jail or an ezjail archive to the root of that new jail, whose name and IP
38address are provided as mandatory parameters. 69address are provided as mandatory parameters.
39 70
71A new entry in ezjails config directory is created, a corresponding new
72\Fi/etc/fstab.hostname\fR allowes the jail to be brought up by next
73reboot (or) via the EZJAIL_PREFIX/etc/rc.d/ezjail.sh script.
74
40If no jail root is specified via the -r option, it is derived from 75If no jail root is specified via the -r option, it is derived from
41the jails name. In this case or, if a jail root is given and does not 76the jails name. In this case or, if a jail root is given and does not
42start with a '/', it is interpreted relative to ezjails root dir 77start with a '/', it is interpreted relative to ezjails root dir
@@ -45,33 +80,39 @@ ezjail root dir, a soft link is created inside this root dir pointing
45to the newly created jails location. 80to the newly created jails location.
46 81
47The -i and the -c option both require a size passed via the -s option 82The -i and the -c option both require a size passed via the -s option
48and create a file based jail image, gbde or geli encrypted for the -c 83and create a file based jail image; gbde or geli encrypted for the -c
49case. The image file is named as the jail root suffixed with \fI.img\fR. 84case. The image file is named after the jail root suffixed with \fI.img\fR.
50 85
51The -x (jail exists) option indicates, that an ezjail already exists 86To install an ezjail archive instead of a vanilla copy of newjail use
52at the jail root. 87-a with the backups location. Note, that you will propably need to tidy
88up things inside an ezjail if you migrate them between different ezjail
89environments. This may include (but is not limited to) reinstalling ports
90or packages for different CPUs or library versions. You may also need to
91copy some libraries from the source host's basejail. Also consider using
92\fIezjail-admin restore\fR, if you only want to revert to an old jails
93state from a backup on the same host.
94
95The -x option indicates, that an ezjail already exists at the jail root.
53.B In this case nothing is copied. ezjail only updates its config. 96.B In this case nothing is copied. ezjail only updates its config.
54This is useful in situations where you just want to alter some of a 97This is useful in situations where you just want to alter some of a
55jail properties and called ezjail-admin delete without the -w option 98jail properties and called ezjail-admin delete without the -w option
56before. However, sanity checks are being performed. 99before. However, sanity checks are being performed.
57 100
58The script creates an entry in its config and a \Fi/etc/fstab.hostname\fR 101Using the -f \fIflavour\fR option you can apply an ezjail \fBFLAVOUR\fR
59file allowing the jail to be brought up after next reboot (or) via 102to your ezjail (e.g. preinstall packages, add users configure rc).
60the EZJAIL_PREFIX/etc/rc.d/ezjail.sh script. 103\fIflavour\fR is a directory tree under ezjails root dir (default:
61 104\fI/usr/jails/flavours\fR). See section \fBFLAVOURS\fR below for more
62The newly created jail can perform some initializiation actions, if the 105details.
63-f \fIflavour\fR option is given, where \fIflavour\fR is a directory tree
64under ezjails root dir (default: \fI/usr/jails/flavours\fR). See section
65\fBFLAVOURS\fR below for more details.
66 106
67Options for newly created jails are read from \fBezjail.conf\fR, refer to 107Options for newly created jails are read from \fBezjail.conf\fR, refer to
68ezjail.conf(5) for more information. 108ezjail.conf(5) for more information.
69.SH ezjail-admin delete 109.SH ezjail-admin console
70removes a jail from ezjails config and the corresponding \fI/etc/fstab.hostname\fR 110Attaches your console to a jail by executing a jexec with its jid.
71file, thus preventing the jail from being brought up on next reboot.
72 111
73If the -w (wipe) option is given, the directory pointed to by the jail 112The command executed in that jail defaults to \fI/usr/bin/login -f root\fR
74root entry is removed as well as the soft link in ezjails root dir. 113 but can be set with the -e modifier or by the ezjail_default_execute
114config variable. A non-running jail is not started by default. If you want
115that, force it with -f.
75.SH ezjail-admin list 116.SH ezjail-admin list
76lists all jails inside ezjails scope. They are sorted by the order they 117lists all jails inside ezjails scope. They are sorted by the order they
77start up, as defined by rcorder. The list format is straight forward. 118start up, as defined by rcorder. The list format is straight forward.
@@ -83,21 +124,8 @@ running, \fB(S)topped\fR. An optional \fB(N)orun\fR stands for disabled jails (s
83\fIezjail-admin config\fR). 124\fIezjail-admin config\fR).
84 125
85Rest of the row is jails jid (if available), its IP, hostname and root directory. 126Rest of the row is jails jid (if available), its IP, hostname and root directory.
86.SH ezjail-admin archive
87creates a backup of one, multiple or all ezjails.
88
89Unless an archive name is given via -a switch, the archive's name is derived from
90jailname, date and time. It is being saved to a directory provided by -d switch
91or the \fIezjail_archivedir\fR variable in \fBezjail.conf\fR and defaults to
92\fI.\fR .
93
94Use -A with no further parameters to archive all jails \fBor\fR specify one or more
95ezjails as parameters.
96
97Use \fIezjail-admin create -a archive\fR to restore an archive. A restore command
98that automatically restores jails from a list of archives is on the way.
99.SH ezjail-admin config 127.SH ezjail-admin config
100manages existing specific ezjails. 128manages specific ezjails.
101 129
102You can prevent an ezjail from being run at system start by the -r norun 130You can prevent an ezjail from being run at system start by the -r norun
103option and reenable it by -r run. 131option and reenable it by -r run.
@@ -109,42 +137,43 @@ renamed as well.
109You can attach image jails for administrative purposes by the -i attach 137You can attach image jails for administrative purposes by the -i attach
110option and detach them with -i detach. It is not possible to run or delete 138option and detach them with -i detach. It is not possible to run or delete
111an attached jail. You can force fscking a jail image with the -i fsck command. 139an attached jail. You can force fscking a jail image with the -i fsck command.
112.SH ezjail-admin console 140.SH ezjail-admin delete
113Attaches your console to a jail by executing a jexec with its jid. 141removes a jail from ezjails config and the corresponding \fI/etc/fstab.hostname\fR
114 142file, thus preventing the jail from being brought up on next reboot.
115The command executed in that jail defaults to /bin/sh but can be set with the
116-e modifier or by the ezjail_default_execute config variable. A non-running
117jail is not started by default. If you want that, force it with -f.
118.SH ezjail-admin install
119fetches everything needed to setup a base jail from an FTP server and
120installs it.
121 143
122Default location for ezjails base jail is \fI/usr/jails\fR, so be sure you 144If the -w (wipe) option is given, the directory pointed to by the jail
123have enough space there (a FreeBSD base without man pages, sources and ports 145root entry is removed as well as the soft link in ezjails root dir.
124is around 120MB). 146.SH ezjail-admin archive
147creates a backup of one, multiple or all ezjails.
125 148
126The -m and -s option will fetch and install man pages (ca. 10MB) and 149Unless an archive name is given via -a switch, its file name is derived from
127sources packages (ca. 450MB) respectively. The -p option invokes the 150jailname, date and time. It is being saved to a directory provided by -d switch
128portsnap utility to fetch and extract a FreeBSD ports tree (ca. 475MB). 151or the \fIezjail_archivedir\fR variable in \fBezjail.conf\fR and defaults to
152\fI.\fR .
129 153
130Default OS version is, whatever uname -r returns. If this does not match 154Use -A with no further parameters to archive all jails \fBor\fR specify one or more
131"*-RELEASE", you will be prompted for a better guess. (Normally 155ezjails as parameters.
132ftp-servers do not provide release candidates or CURRENT builds). You can
133use the -r option to specify a release from command line.
134 156
135Default host to fetch packages from is ftp.freebsd.org, you may want to 157Use \fIezjail-admin restore\fR or \fIezjail-admin create -a archive\fR to restore
136change this via the -h option or in ezjail.conf(5). 158an archive.
159.SH ezjail-admin restore
160creates new ezjails from archived versions. It tries to collect all information
161necessary to do that without user interaction from the archives, thus allowing
162it to be run from a script.
137 163
138If the specified location begins with file://, your local copy of the 164Pass one or more archives or jail names. For jail names ezjail-admin will try to
139release is used. That way you can do some modifications to install.sh 165find the newest backup in its archive directory, as given in ezjail.conf(5) which
140scripts before executing them. 166defaults to . and can be overridden via -d.
141 167
142You can later update your world from CVS or update ports by \fIezjail-admin 168By default \fBezjail-admin restore\R refuses to restore on a host different from
143update\fR or rerun this subcommand with another OS version. 169where it was archived. Use -f to force that.
144.SH ezjail-admin update 170.SH ezjail-admin update
145creates or update ezjails basejail. Depending on the parameters 171creates or updates ezjails environment (aka basejail) from source. To install it
146given it will install a FreeBSD system from a source tree whose location 172from ftp servers, use ezjail-admin install.
147is either provided in the \fBezjail.conf\fR config file or via the -s option. 173
174Depending on the parameters given it will install the basejail from a source
175tree whose location is either provided in the \fBezjail.conf\fR config file or
176via the -s option.
148 177
149If the -p or -P options are given, the base jail also is given a copy of 178If the -p or -P options are given, the base jail also is given a copy of
150FreeBSDs ports tree, which is in turn linked into all newly created 179FreeBSDs ports tree, which is in turn linked into all newly created