Documents
Programs
Projects
|
Jailinit
This program is used in our virtual servers. It works as a replacement
for the init program, which is usually the first program to be run after
the kernel is loaded. In a virtual server (jail) there is no such thing.
This makes it rather difficult to restart a virtual server from the inside,
as well as from the outside.
Hence the jailinit program. It is the first program to be started in a
jail and responsible for starting up all other programs and services.
After finishing this it goes to sleep until it receives a SIGHUP.
When this happens it will kill all other processes in the jail and
restart it.
If it gets a SIGTERM signal instead, all processes will be halted and the
jail will go down cleanly.
You can allways find the PID of the jailinit process associated with
jail X by running the command:
cat /path/to/jailX/var/run/jailinit.pid.
You can get the source code here.
This latest version works on both FreeBSD 4.x and FreeBSD 5.x !
To compile jailinit properly, you may want to use this Makefile. This will create a
statically linked binary, so you can even use it in a jail without any
shared libraries, which is a Good Thing (TM) securitywise.
Questions, Remarks, Ideas? Send an email
 
 |
Friends' homepages
Members Area Click here to go to our secure server (you need an account +
password for this) |