rc.d/jail issues
Paul Schenkeveld
freebsd at psconsult.nl
Thu Jan 27 12:04:55 UTC 2011
Hi,
The order in which jails are started by rc.d/jail is the order in which
jails are listed in $jail_list which is fine. On shutdown, jails are
stopped in the same order they were started which in some cases is not
fine. If jail B depends on functionality provided by jail A, one would
like to start A before B but shutdown B before A. Would it make sense
to reverse the order in which jails are stopped during shutdown by
reversing the nales in $jail_list?
The attached patch reverses $jail_list during shutdown.
Regards,
Paul Schenkeveld
--- etc/rc.d/jail.orig 2009-08-15 14:00:54.000000000 +0200
+++ etc/rc.d/jail 2011-01-27 13:03:17.000000000 +0100
@@ -678,7 +678,7 @@
jail_stop()
{
echo -n 'Stopping jails:'
- for _jail in ${jail_list}
+ for _jail in `reverse_list ${jail_list}`
do
if [ -f "/var/run/jail_${_jail}.id" ]; then
_jail_id=$(cat /var/run/jail_${_jail}.id)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rc_d_jail.patch
Type: text/x-diff
Size: 346 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110127/c721b501/rc_d_jail.bin
More information about the freebsd-hackers
mailing list