mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Skip jails which are already running and inform why.
We're checking for /var/run/jail_<name>.id file and if it exists, we don't start the jail. It should be also safe in case of reboot(8), because rc.d/cleanvar script is going to remove /var/run/jail_* files. It helps to avoid potential mess when the same jail is started twice, because of an administrator mistake (been there, done that). MFC after: 1 week
This commit is contained in:
parent
3dd22bbe78
commit
5b3e518936
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148839
@ -158,6 +158,10 @@ jail_start()
|
||||
for _jail in ${jail_list}
|
||||
do
|
||||
init_variables $_jail
|
||||
if [ -f /var/run/jail_${_jail}.id ]; then
|
||||
echo -n " [${jail_hostname} already running (/var/run/jail_${_jail}.id exists)]"
|
||||
continue;
|
||||
fi
|
||||
if checkyesno jail_mount; then
|
||||
info "Mounting fstab for jail ${_jail} (${jail_fstab})"
|
||||
if [ ! -f "${jail_fstab}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user