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)
--- 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)
_______________________________________________ freebsd-jail@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-jail To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"