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