SYNOPSIS

       jailer [ console-file ]


DESCRIPTION

       jailer  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:

        jail /jails/myjail host 10.0.1.1 /bin/sh /etc/rc

       use:

        jail /jails/myjail host 10.0.1.1 /usr/local/sbin/jailer


       jailer will start the jail by  running  /etc/rc  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 /etc/rc.shutdown,
       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 jailer to restart the jail. If the  jail  is
              not running at the time it is simply started.

       QUIT   Initiates  a jail shutdown.  jailer remains running
              after processing the request.

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



JAIL CONSOLE MANAGEMENT

       A  normal  jail  has  no console perse, and dmesg(8) reads
       straight from the  host  kernel  message  buffer.   jailer
       changes this to provide a virtual console for the jail.

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

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



OPTIONS

       console-file
              Overrides the default location of the  console  log
              file, usually /var/log/console



FILES

       /var/log/console
              Virtual console file.



BUGS

       Virtual  jail  consoles  don't  work with FreeBSD 5.0 yet.
       This is due to devfs(8)

       shutdown(8) doesn't work with the halt and reboot scripts.



AUTHOR

       Nate Nielsen <nielsen@memberwebs.com>



SEE ALSO

       jail(8), halt(8), reboot(8), dmesg(8)



Version 1.2                  May 2002                   JAILER(8)

Man(1) output converted with man2html