jail_<name>_conf in /etc/rc.conf
Raphael H. Becker
rabe at p-i-n.com
Wed Jun 14 10:10:34 UTC 2006
Hi *,
having a jail-server and maintaining lots of jails may cause headache,
when editing /etc/rc.conf.
My idea is to define per-jail.conf files outside /etc/rc.conf.
# ---- /etc/rc.conf ----
# Jail-defaults and stuff
jail_enable="YES"
jail_list="foo0 foo1 foo2 foo3 bar0 bar1 bar2 "
jail_set_hostname_allow="NO"
# per-Jail conf:
jail_foo0_conf=/etc/jails/foo0.conf
jail_foo1_conf=/etc/jails/foo1.conf
jail_foo2_conf=/etc/jails/foo2.conf
jail_foo3_conf=/etc/jails/foo3.conf
[...]
... and in /etc/jails/foo0.conf
jail_rootdir="/data/jails/foo0/"
jail_hostname="foo0.example.org"
jail_ip="192.168.0.10"
jail_interface="fxp1"
jail_exec_start="/bin/sh /etc/rc"
jail_exec_afterstart0="/bin/sh command"
...
This would make using conf-templates much easier and you don't
need to do evil "script-magic" on /etc/rc.conf.
This may fit into the latest /etc/rc.d/jail script: just look for
$jail_foo0_conf first and use this .conf (if found).
Any alternative solution getting something like this running?
Regards
Raphael Becker
More information about the freebsd-current
mailing list