Don't remove the /var/run/jail_name.id file if a jail fails to start.

This messes up ezjail (and possibly others), when attempting to start
a jail that already exists.

PR:		208806
Reviewed by:	tj
MFC after:	5 days
This commit is contained in:
Jamie Gritton 2016-04-23 16:23:01 +00:00
parent 1980d11b5f
commit abfdc877c6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298516

View File

@ -489,7 +489,6 @@ jail_start()
if _jid=$($jail_jls -j $_j jid); then
echo "$_jid" > /var/run/jail_${_j}.id
else
rm -f /var/run/jail_${_j}.id
echo " cannot start jail " \
"\"${_hostname:-${_j}}\": "
fi
@ -513,7 +512,6 @@ jail_start()
_jid=$($jail_jls -j $_j jid)
echo $_jid > /var/run/jail_${_j}.id
else
rm -f /var/run/jail_${_j}.id
echo " cannot start jail " \
"\"${_hostname:-${_j}}\": "
cat $_tmp