Hi
I have a little problem with my /etc/rc.conf. Commands like $(cat /var/foo) are currently completely ignored. Currently I will setup Jails with Vimage automatically using a bridge and epair devices. If I do it by hand it works very well. My biggest problem is if a Jail will be restarted, it becomes another JID. After start up the Jail I need the correct JID of the Jail to attach the epair device to the Jail.
So my first idea was to write this in my /etc/rc.conf
But it seems $(cat /var/run/jail_fbtomcat.id) will be ignored. So is there another working command instead for $(cat /var/run/jail_fbtomcat.id) and the /etc/rc.conf? Just to get the new JID from the Jail. Or can I define the JID per each Jail staticly?
best regards
Darko Hojnik
I have a little problem with my /etc/rc.conf. Commands like $(cat /var/foo) are currently completely ignored. Currently I will setup Jails with Vimage automatically using a bridge and epair devices. If I do it by hand it works very well. My biggest problem is if a Jail will be restarted, it becomes another JID. After start up the Jail I need the correct JID of the Jail to attach the epair device to the Jail.
So my first idea was to write this in my /etc/rc.conf
Code:
gateway_enable="YES"
cloned_interfaces="bridge0"
ifconfig_bridge0="inet 10.0.0.1 netmask 255.255.255.0 up"
jail_enable="YES"
jail_v2_enable="YES"
jail_list="fbtomcat"
jail_fbtomcat_rootdir="/var/jails/fb-tomcat"
jail_fbtomcat_name="fbtomcat"
jail_fbtomcat_hostname="fbtomcat"
jail_fbtomcat_devfs_enable="YES"
jail_fbtomcat_devfs_ruleset="devfsrules_jail"
jail_fbtomcat_vnet_enable="YES"
jail_fbtomcat_exec_prestart0="ifconfig epair0 create"
jail_fbtomcat_exec_prestart1="ifconfig bridge0 addm epair0a"
jail_fbtomcat_exec_prestart2="ifconfig epair0a up"
jail_fbtomcat_exec_poststart0="ifconfig epair0b vnet $(cat /var/run/jail_fbtomcat.id)"
jail_fbtomcat_exec_poststart1="jexec $(cat /var/run/jail_fbtomcat.id) /etc/rc"
jaik_fbtomcat_exec_poststart2="jexec $(cat /var/run/jail_fbtomcat.id) /etc/rc.d/netif start"
jail_fbtomcat_exec_poststop0="ifconfig bridge0 deletem epair0a"
jail_fbtomcat_exec_poststop1="ifconfig epair0a destroy"
But it seems $(cat /var/run/jail_fbtomcat.id) will be ignored. So is there another working command instead for $(cat /var/run/jail_fbtomcat.id) and the /etc/rc.conf? Just to get the new JID from the Jail. Or can I define the JID per each Jail staticly?
best regards
Darko Hojnik