svn commit: r298728 - stable/10/etc/rc.d

Jamie Gritton jamie at FreeBSD.org
Thu Apr 28 01:31:08 UTC 2016


Author: jamie
Date: Thu Apr 28 01:31:07 2016
New Revision: 298728
URL: https://svnweb.freebsd.org/changeset/base/298728

Log:
  MFC r298516:
  
    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

Modified:
  stable/10/etc/rc.d/jail
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/jail
==============================================================================
--- stable/10/etc/rc.d/jail	Thu Apr 28 01:12:38 2016	(r298727)
+++ stable/10/etc/rc.d/jail	Thu Apr 28 01:31:07 2016	(r298728)
@@ -471,7 +471,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
@@ -495,7 +494,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


More information about the svn-src-all mailing list