diff options
author | erdgeist <erdgeist@erdgeist.org> | 2007-02-21 04:20:56 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2007-02-21 04:20:56 +0000 |
commit | b5f4cc892ac0b38d2ea633a67fa7bb6795aaa4fc (patch) | |
tree | 8e08c6e0d94878c4ffed03c511eeaf6a4232a21f | |
parent | 6179ac659086a528a950cfb1380544879be163b4 (diff) |
Learned groff (a little) and beautified the man page.
-rwxr-xr-x | man1/ezjail-admin.1 | 153 | ||||
-rwxr-xr-x | man5/ezjail.5 | 46 |
2 files changed, 63 insertions, 136 deletions
diff --git a/man1/ezjail-admin.1 b/man1/ezjail-admin.1 index 3ab3b33..e004d28 100755 --- a/man1/ezjail-admin.1 +++ b/man1/ezjail-admin.1 | |||
@@ -4,34 +4,26 @@ ezjail-admin \- Administrate ezjail | |||
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
5 | .T | 5 | .T |
6 | .B ezjail-admin create | 6 | .B ezjail-admin create |
7 | [-f flavour] [-r jailroot] [-s imagesize] [-ibx] [-c bde|eli] [-C attachargs] | 7 | [-f flavour] [-r jailroot] [-s imagesize] [-ibx] [-c bde|eli] [-C attachargs]\fI hostname jailip |
8 | .I hostname jailip | ||
9 | 8 | ||
10 | .T | 9 | .T |
11 | .B ezjail-admin delete | 10 | .B ezjail-admin delete \fR[-w] \fI hostname |
12 | [-w] | ||
13 | .I hostname | ||
14 | 11 | ||
15 | .T | 12 | .T |
16 | .B ezjail-admin list | 13 | .B ezjail-admin list |
17 | 14 | ||
18 | .T | 15 | .T |
19 | .B ezjail-admin config | 16 | .B ezjail-admin config\fR [-r run|norun] [-n newname] [-i attach|detach]\fI jailname |
20 | [-r run|norun] [-n newname] [-i attach|detach] | ||
21 | .I jailname | ||
22 | 17 | ||
23 | .T | 18 | .T |
24 | .B ezjail-admin install | 19 | .B ezjail-admin install\fR [-mps] [-h host] [-r release] |
25 | [-mps] [-h host] [-r release] | ||
26 | 20 | ||
27 | .T | 21 | .T |
28 | .B ezjail-admin update | 22 | .B ezjail-admin update\fR [-s sourcetree] [-i] [-pP] |
29 | [-s sourcetree] [-i] [-pP] | ||
30 | .SH DESCRIPTION | 23 | .SH DESCRIPTION |
31 | The | 24 | The \fB ezjail-admin\fR tool is used to manage jails inside the ezjail |
32 | .B ezjail-admin | 25 | scope. It is not used to start or stop ezjails jails. Refer to \fIezjail(5)\fR |
33 | tool is used to manage jails inside the ezjail scope. It is not used | 26 | for more details. |
34 | to start or stop ezjails jails. Refer to ezjail(5) for more details. | ||
35 | .SH ezjail-admin create | 27 | .SH ezjail-admin create |
36 | copies the template jail to the root of a new jail, whose name and IP | 28 | copies the template jail to the root of a new jail, whose name and IP |
37 | address are provided as mandatory parameters. | 29 | address are provided as mandatory parameters. |
@@ -39,17 +31,13 @@ address are provided as mandatory parameters. | |||
39 | If no jail root is specified via the -r option, it is derived from | 31 | If no jail root is specified via the -r option, it is derived from |
40 | the jails name. In this case or, if a jail root is given and does not | 32 | the jails name. In this case or, if a jail root is given and does not |
41 | start with a '/', it is interpreted relative to ezjails root dir | 33 | start with a '/', it is interpreted relative to ezjails root dir |
42 | (default: | 34 | (default: \fI/usr/jails\fR). If a specified jail root lies outside |
43 | .I /usr/jails | 35 | ezjail root dir, a soft link is created inside this root dir pointing |
44 | ). If a specified jail root lies outside ezjail root dir, a soft link | 36 | to the newly created jails location. |
45 | is created inside this root dir pointing to the newly created jails | ||
46 | location. | ||
47 | 37 | ||
48 | The -i and the -c option both require a size passed via the -s option | 38 | The -i and the -c option both require a size passed via the -s option |
49 | and create a file based jail image, gbde or geli encrypted for the -c | 39 | and create a file based jail image, gbde or geli encrypted for the -c |
50 | case. The image file is named as the jail root suffixed with | 40 | case. The image file is named as the jail root suffixed with \fI.img\fR. |
51 | .I .img | ||
52 | . | ||
53 | 41 | ||
54 | The -x (jail exists) option indicates, that an ezjail already exists | 42 | The -x (jail exists) option indicates, that an ezjail already exists |
55 | at the jail root. | 43 | at the jail root. |
@@ -58,30 +46,20 @@ This is useful in situations where you just want to alter some of a | |||
58 | jail properties and called ezjail-admin delete without the -w option | 46 | jail properties and called ezjail-admin delete without the -w option |
59 | before. However, sanity checks are being performed. | 47 | before. However, sanity checks are being performed. |
60 | 48 | ||
61 | The script creates an entry in its config and a | 49 | The script creates an entry in its config and a \Fi/etc/fstab.hostname\fR |
62 | .I /etc/fstab.hostname | ||
63 | file allowing the jail to be brought up after next reboot (or) via | 50 | file allowing the jail to be brought up after next reboot (or) via |
64 | the EZJAIL_PREFIX/etc/rc.d/ezjail.sh script. | 51 | the EZJAIL_PREFIX/etc/rc.d/ezjail.sh script. |
65 | 52 | ||
66 | The newly created jail can perform some initializiation actions, if the | 53 | The newly created jail can perform some initializiation actions, if the |
67 | -f | 54 | -f \fIflavour\fR option is given, where \fIflavour\fR is a directory tree |
68 | .I flavour | 55 | under ezjails root dir (default: \fI/usr/jails/flavours\fR). See section |
69 | option is given, where | 56 | \fBFLAVOURS\fR below for more details. |
70 | .I flavour | 57 | |
71 | is a directory tree under ezjails root dir (default: | 58 | Options for newly created jails are read from \fBezjail.conf\fR, refer to |
72 | .I /usr/jails/flavours | 59 | ezjail.conf(5) for more information. |
73 | ). See section | ||
74 | .B FLAVOURS | ||
75 | below for more details. | ||
76 | |||
77 | Options for newly created jails are read from | ||
78 | .B ezjail.conf, | ||
79 | refer to ezjail.conf(5) for more information. | ||
80 | .SH ezjail-admin delete | 60 | .SH ezjail-admin delete |
81 | removes a jail from ezjails config and the corresponding | 61 | removes a jail from ezjails config and the corresponding \fI/etc/fstab.hostname\fR |
82 | .I /etc/fstab.hostname | 62 | file, thus preventing the jail from being brought up on next reboot. |
83 | file, thus preventing the jail from being brought | ||
84 | up on next reboot. | ||
85 | 63 | ||
86 | If the -w (wipe) option is given, the directory pointed to by the jail | 64 | If the -w (wipe) option is given, the directory pointed to by the jail |
87 | root entry is removed as well as the soft link in ezjails root dir. | 65 | 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. | |||
89 | lists all jails inside ezjails scope. They are sorted by the order they | 67 | lists all jails inside ezjails scope. They are sorted by the order they |
90 | start up, as defined by rcorder. The list format is straight forward. | 68 | start up, as defined by rcorder. The list format is straight forward. |
91 | 69 | ||
92 | A status flag consisting of 2 or 3 letters, the first meaning | 70 | A status flag consisting of 2 or 3 letters, the first meaning \fB(D)irectory\fR |
93 | .B (D)irectory | 71 | based, \fB(I)mage\fR based, \fB(B)de\fR crypto image based, \fB(E)li\fR crypto |
94 | based, | 72 | image based. The second one meaning \fB(R)unning\fR, \fB(A)ttached\fR but not |
95 | .B (I)mage | 73 | running, \fB(S)topped\fR. An optional \fB(N)orun\fR stands for disabled jails (see |
96 | based, | 74 | \fIezjail-admin config\fR). |
97 | .B (B)de | 75 | |
98 | crypto image based, | 76 | Rest of the row is jails jid (if available), its IP, hostname and root directory. |
99 | .B (E)li | ||
100 | crypto image based. The second one meaning | ||
101 | .B (R)unning | ||
102 | , | ||
103 | .B (A)ttached | ||
104 | but not running, | ||
105 | .B (S)topped | ||
106 | . An optional | ||
107 | .B (N)orun | ||
108 | stands for disabled jails (see | ||
109 | .I ezjail-admin config | ||
110 | ). | ||
111 | |||
112 | Rest of the row is follow by jails jid (if available), its IP, hostname | ||
113 | and root directory. | ||
114 | .SH ezjail-admin config | 77 | .SH ezjail-admin config |
115 | manages existing specific ezjails. | 78 | manages existing specific ezjails. |
116 | 79 | ||
@@ -128,10 +91,9 @@ an attached jail. | |||
128 | fetches everything needed to setup a base jail from an FTP server and | 91 | fetches everything needed to setup a base jail from an FTP server and |
129 | installs it. | 92 | installs it. |
130 | 93 | ||
131 | Default location for ezjails base jail is | 94 | Default location for ezjails base jail is \fI/usr/jails\fR, so be sure you |
132 | .I /usr/jails | 95 | have enough space there (a FreeBSD base without man pages, sources and ports |
133 | , so be sure you have enough space there (a FreeBSD base without man | 96 | is around 120MB). |
134 | pages, sources and ports is around 120MB). | ||
135 | 97 | ||
136 | The -m and -s option will fetch and install man pages (ca. 10MB) and | 98 | The -m and -s option will fetch and install man pages (ca. 10MB) and |
137 | sources packages (ca. 450MB) respectively. The -p option invokes the | 99 | 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 | |||
149 | release is used. That way you can do some modifications to install.sh | 111 | release is used. That way you can do some modifications to install.sh |
150 | scripts before executing them. | 112 | scripts before executing them. |
151 | 113 | ||
152 | You can later update your world from CVS or update ports by | 114 | You can later update your world from CVS or update ports by \fIezjail-admin |
153 | .U ezjail-admin update | 115 | update\fR or rerun this subcommand with another OS version. |
154 | or rerun this subcommand with another OS version. | ||
155 | .SH ezjail-admin update | 116 | .SH ezjail-admin update |
156 | creates or update ezjails basejail. Depending on the parameters | 117 | creates or update ezjails basejail. Depending on the parameters |
157 | given it will install a FreeBSD system from a source tree whose location | 118 | given it will install a FreeBSD system from a source tree whose location |
158 | is either provided in the | 119 | is either provided in the \fBezjail.conf\fR config file or via the -s option. |
159 | .B ezjail.conf | ||
160 | config file or via the -s option. | ||
161 | 120 | ||
162 | If the -p or -P options are given, the base jail also is given a copy of | 121 | If the -p or -P options are given, the base jail also is given a copy of |
163 | FreeBSDs ports tree, which is in turn linked into all newly created | 122 | FreeBSDs ports tree, which is in turn linked into all newly created |
164 | ezjails. The portsnap utility is invoked to do the actual work. | 123 | ezjails. The portsnap utility is invoked to do the actual work. |
165 | 124 | ||
166 | If the -P option is given, | 125 | If the -P option is given, \fBonly the ports tree will be updated,\fR this can |
167 | .B only the ports tree will be updated, | 126 | be done, while jails are running. |
168 | this can be done, while jails are running. | ||
169 | 127 | ||
170 | If the -i (install only) option is given, | 128 | If the -i (install only) option is given, \fBezjail-admin update\fR only |
171 | .B ezjail-admin update | 129 | performes a \fImake installworld,\fR otherwise \fImake world\fR is invoked. |
172 | only performes a | ||
173 | .I make installworld, | ||
174 | otherwise | ||
175 | .I make world | ||
176 | is invoked. | ||
177 | 130 | ||
178 | .SH NOTES | 131 | .SH NOTES |
179 | .B ezjail-admin update | 132 | .B ezjail-admin update\fR uses a temporary directory to install its world to, |
180 | uses a temporary directory to install its world to, thus leaving intact | 133 | thus leaving intact all installed libraries, if a base jail already exists. |
181 | all installed libraries, if a base jail already exists. | 134 | |
182 | 135 | When using the \fBezjail-admin update\fR option, be careful to use the same | |
183 | When using the | 136 | FreeBSD source tree used to build the host systems world, or at least its |
184 | .B ezjail-admin update | 137 | kernel. Combining a make world in the host system with \fBezjail-admin update\fR |
185 | option, be careful to use the same FreeBSD source tree used to build the | ||
186 | host systems world, or at least its kernel. Combining a make world in the | ||
187 | host system with | ||
188 | .B ezjail-admin update | ||
189 | is considered a good idea. | 138 | is considered a good idea. |
190 | 139 | ||
191 | When a ports tree exists in base jail, a make.conf containing reasonable | 140 | When a ports tree exists in base jail, a make.conf containing reasonable |
192 | values for having ports in jails is created in the template jail. | 141 | values for having ports in jails is created in the template jail. |
193 | .SH FLAVOURS | 142 | .SH FLAVOURS |
194 | .B ezjail-admin | 143 | .B ezjail-admin\fR provides an easy way to create many jails with similar or |
195 | provides an easy way to create many jails with similar or identical | 144 | identical properties. |
196 | properties. | ||
197 | 145 | ||
198 | A sample flavour config directory resides under | 146 | A sample flavour config directory resides under |
199 | .I EZJAIL_PREFIX/share/examples/ezjail/default/. | 147 | .I EZJAIL_PREFIX/share/examples/ezjail/default/.\fR Some typical Jail |
200 | Some typical Jail initialization actions are demonstrated and you are | 148 | initialization actions are demonstrated and you are encouraged to use it as a |
201 | encouraged to use it as a template for your flavours. | 149 | template for your flavours. |
202 | 150 | ||
203 | If a flavour is selected on jail creation, the flavour root is being | 151 | If a flavour is selected on jail creation, the flavour root is being |
204 | copied to the new Jails root, mostly containing an | 152 | copied to the new Jails root, mostly containing an \fI/ezjail.flavour\fR. |
205 | .I /ezjail.flavour . | ||
206 | If the Jail starts up for the first time this script is run. | 153 | If the Jail starts up for the first time this script is run. |
207 | 154 | ||
208 | In its default form it will create some groups and users, change the | 155 | In its default form it will create some groups and users, change the |
diff --git a/man5/ezjail.5 b/man5/ezjail.5 index 49fd0c6..f147ea9 100755 --- a/man5/ezjail.5 +++ b/man5/ezjail.5 | |||
@@ -11,44 +11,24 @@ effort and aims for minimum system resource usage. | |||
11 | If you are not familiar with the FreeBSD jail concept, please refer to | 11 | If you are not familiar with the FreeBSD jail concept, please refer to |
12 | jail(8) before continuing. | 12 | jail(8) before continuing. |
13 | .SH OVERVIEW | 13 | .SH OVERVIEW |
14 | One | 14 | One \fIbase jail\fR is filled with most userland binaries and libraries and |
15 | .I base jail | 15 | then mounted read only into a number of stripped down jails via |
16 | is filled with most userland binaries and libraries and then mounted | 16 | .B mount_nullfs(8)\fR - thus saving lots of inodes and memory resources. |
17 | read only into a number of stripped down jails via | ||
18 | .B mount_nullfs(8) | ||
19 | - thus saving lots of inodes and memory resources. | ||
20 | .SH INVOCATION | 17 | .SH INVOCATION |
21 | The ezjail script | 18 | The ezjail script \fBEZJAIL_PREFIX/etc/rc.d/ezjail.sh\fR takes parameters \fIstart, |
22 | .B EZJAIL_PREFIX/etc/rc.d/ezjail.sh | 19 | startcrypto, restart\fR and \fIstop\fR. It may be passed an additional list of |
23 | takes parameters | 20 | jails. If no jail name is specified (usually when the script is being called by |
24 | .I start, startcrypto, restart | 21 | rc.local at boot and shutdown time), all jails in ezjails scope, except crypto |
25 | and | 22 | image jails (or jails marked as blocking), are being started/stopped. To start |
26 | .I stop. | 23 | all crytpo image jails (or those depending on them), use the \fIstartcrypto\fR parameter. |
27 | It may be passed an additional list of jails. If no jail name is | ||
28 | specified (usually when the script is being called by rc.local at boot | ||
29 | and shutdown time), all jails in ezjails scope, except crypto image | ||
30 | jails (or jails marked as blocking), are being started/stopped. To | ||
31 | start all crytpo image jails (or those depending on them), use the | ||
32 | .I startcrypto | ||
33 | parameter. | ||
34 | 24 | ||
35 | The script examines its config, attaches and mounts images, sets | 25 | The script examines its config, attaches and mounts images, sets |
36 | variables for each jail in the jail_list before passing its command on | 26 | variables for each jail in the jail_list before passing its command on |
37 | to the | 27 | to the \fB/etc/rc.d/jail\fR script. |
38 | .B /etc/rc.d/jail | ||
39 | script. | ||
40 | .SH NOTES | 28 | .SH NOTES |
41 | .B ezjail.sh | 29 | .B ezjail.sh\fR enforces the execution of \fB/etc/rc.d/jail\fR, by |
42 | enforces the execution of | 30 | prepending \fI"one"\fR to the start, restart and stop commands so it is |
43 | .B /etc/rc.d/jail, | 31 | .B NOT NECESSARY\fR to set \fIjail_enable\fR in the \fB/etc/rc.conf\fR |
44 | by prepending | ||
45 | .I "one" | ||
46 | to the start, restart and stop commands so it is | ||
47 | .B NOT NECESSARY | ||
48 | to set | ||
49 | .I jail_enable | ||
50 | in the | ||
51 | .B /etc/rc.conf | ||
52 | config file. | 32 | config file. |
53 | .SH FILES | 33 | .SH FILES |
54 | EZJAIL_PREFIX/etc/ezjail.conf | 34 | EZJAIL_PREFIX/etc/ezjail.conf |