[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ezjail stop does not call /etc/rc.shutdown
Hi,
I discovered, that my jail was not shutdown via /etc/rc.shutdown. IMHO it should be enabled
by default, because it is the clean way also performed in base system.
The reason, why the rc.shutdown script was not called is the default configuration line:
export jail_myjail_exec="/bin/sh /etc/rc"
It is evaluated in base system's /etc/rc.d/jail:
if [ -n "${_exec}" ]; then
# simple/backward-compatible execution
_exec_start="${_exec}"
_exec_stop=""
else
# flexible execution
if [ -z "${_exec_start}" ]; then
_exec_start="/bin/sh /etc/rc"
if [ -z "${_exec_stop}" ]; then
_exec_stop="/bin/sh /etc/rc.shutdown"
fi
fi
fi
Possible solutions for the problem:
1. Remove config line 'export jail_myjail_exec="/bin/sh /etc/rc"'
It that case defaults for start and shutdown are used.
2. Supply both config entries:
export jail_myjail_exec_start="/bin/sh /etc/rc"
export jail_myjail_exec_stop="/bin/sh /etc/rc.shutdown"
Used Configuration for my tests:
FreeBSD 8.0-STABLE r203748
current ezjail ($Id: ezjail-admin,v 1.248 2010/02/08 05:05:04 erdgeist Exp $)
Regards,
Frank
--
Frank Behrens, Osterwieck, Germany
PGP-key 0x5B7C47ED on public servers available.