Date: Thu, 27 Jan 2011 13:04:47 +0100 From: Paul Schenkeveld <freebsd@psconsult.nl> To: freebsd-jail@freebsd.org, freebsd-hackers@freebsd.org Subject: rc.d/jail issues Message-ID: <20110127120447.GA40060@psconsult.nl>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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)
[-- Attachment #2 --]
--- 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110127120447.GA40060>
