summaryrefslogtreecommitdiff
path: root/doc/jailer_man.html
blob: 229d29749868c89360810facf543d2d7a9d16710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<HTML>
<BODY>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->

</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>jailer</B> <B>[</B> <I>console-file</I> <B>]</B>


</PRE>
<H2>DESCRIPTION</H2><PRE>
       <B>jailer</B>  manages  the  startup  and shutdown of a jail from
       within the jail. It also  manages  the  jails  console  by
       linking /dev/console inside the jail to a log file.

       To use, replace the '/bin/sh /etc/rc' portion of your jail
       startup command with jailer. For example instead of:

        <B>jail</B> <B>/jails/myjail</B> <B>host</B> <B>10.0.1.1</B> <B>/bin/sh</B> <B>/etc/rc</B>

       use:

        <B>jail</B> <B>/jails/myjail</B> <B>host</B> <B>10.0.1.1</B> <B>/usr/local/sbin/jailer</B>


       <B>jailer</B> will start the jail by  running  <I>/etc/rc</I>  and  then
       remain  running  as  a  daemon inside the jail waiting for
       signals to perform shutdown or restarts.

       A shutdown is performed by first running <I>/etc/rc.shutdown</I>,
       and  then  killing  all  the  processes  still  running. A
       restart is a combination of the above.


       The following signals have special meaning to the jailer:

       HUP    Causes <B>jailer</B> to restart the jail. If the  jail  is
              not running at the time it is simply started.

       QUIT   Initiates  a jail shutdown.  <B>jailer</B> remains running
              after processing the request.

       TERM   Same as <I>QUIT</I> but also quits jailer.  No  more  pro-
              cesses will be left running inside the jail.



</PRE>
<H2>JAIL CONSOLE MANAGEMENT</H2><PRE>
       A  normal  jail  has  no console perse, and <B>dmesg(8)</B> reads
       straight from the  host  kernel  message  buffer.   <B>jailer</B>
       changes this to provide a virtual console for the jail.

       On  jailer startup the file <I>/var/log/console</I> is created or
       truncated.  <I>/dev/console</I> is then hard linked to  the  con-
       sole file.

       Along  with  the  jailer  distribution  you'll  find a new
       <B>dmesg(8)</B> which  just  reads  from  <I>/dev/console.</I>   Replace
       <B>/sbin/</B><B>dmesg(8)</B> with this new executable and you're set.



</PRE>
<H2>OPTIONS</H2><PRE>
       console-file
              Overrides the default location of the  console  log
              file, usually <I>/var/log/console</I>



</PRE>
<H2>FILES</H2><PRE>
       <I>/var/log/console</I>
              Virtual console file.



</PRE>
<H2>BUGS</H2><PRE>
       Virtual  jail  consoles  don't  work with FreeBSD 5.0 yet.
       This is due to <B>devfs(8)</B>

       <B>shutdown(8)</B> doesn't work with the <I>halt</I> and <I>reboot</I> scripts.



</PRE>
<H2>AUTHOR</H2><PRE>
       Nate Nielsen &lt;nielsen@memberwebs.com&gt;



</PRE>
<H2>SEE ALSO</H2><PRE>
       <B>jail(8)</B>, <B>halt(8)</B>, <B>reboot(8)</B>, <B>dmesg(8)</B>



Version 1.2                  May 2002                   <B>JAILER(8)</B>
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>