conf/150599: [patch] /etc/rc.d/jail does not set jailname.

Uffe Jakobsen uffe at uffe.org
Mon Dec 6 13:00:25 UTC 2010


The following reply was made to PR conf/150599; it has been noted by GNATS.

From: Uffe Jakobsen <uffe at uffe.org>
To: bug-followup at FreeBSD.org, uffe at uffe.org
Cc:  
Subject: Re: conf/150599: [patch] /etc/rc.d/jail does not set jailname.
Date: Mon, 06 Dec 2010 13:30:34 +0100

 This is a multi-part message in MIME format.
 --------------030308060500020604000201
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 
 I purpose the attached patch
 
 
 
 --------------030308060500020604000201
 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
  name="jail.rc.head.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="jail.rc.head.patch"
 
 --- jail.rc.head	2010-12-06 12:49:49.000000000 +0100
 +++ jail.rc.head.fix	2010-12-06 13:20:26.000000000 +0100
 @@ -39,6 +39,7 @@
  	_devdir="${_rootdir}/dev"
  	_fdescdir="${_devdir}/fd"
  	_procdir="${_rootdir}/proc"
 +	eval _jailname=\"\$jail_${_j}_name\"
  	eval _hostname=\"\$jail_${_j}_hostname\"
  	eval _ip=\"\$jail_${_j}_ip\"
  	eval _interface=\"\${jail_${_j}_interface:-${jail_interface}}\"
 @@ -644,6 +645,9 @@
  			i=$((i + 1))
  		done
  
 +		if [ -n "${_jailname}" ] ; then
 +			_flags="${_flags} -n ${_jailname}";
 +		fi
  		eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \
  			\"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \
  			</dev/null
 
 --------------030308060500020604000201--


More information about the freebsd-jail mailing list