svn commit: r268168 - stable/8/etc/rc.d

Bryan Drewery bdrewery at FreeBSD.org
Wed Jul 2 19:19:00 UTC 2014


Author: bdrewery
Date: Wed Jul  2 19:18:59 2014
New Revision: 268168
URL: http://svnweb.freebsd.org/changeset/base/268168

Log:
  MFC r243080:
  
    Only pass ip[46].addr when _addrl contains a value
  
  Partial MFC r204759:
  
    Redirect stdin from /dev/null when starting a jail:
      At least in RELENG_7 this fixes some start problems for some programs
      from the ports. It is also more correct, as a jail shall not expect
      input (interactivity) from the jail-host.
  
  PR:		180916

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

Modified: stable/8/etc/rc.d/jail
==============================================================================
--- stable/8/etc/rc.d/jail	Wed Jul  2 17:32:43 2014	(r268167)
+++ stable/8/etc/rc.d/jail	Wed Jul  2 19:18:59 2014	(r268168)
@@ -654,7 +654,9 @@ jail_start()
 		done
 
 		eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \
-			ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1
+			${_addrl:+ip4.addr=\"${_addrl}\"} ${_addr6l:+ip6.addr=\"${_addr6l}\"} \
+			${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \
+			</dev/null
 
 		if [ "$?" -eq 0 ] ; then
 			_jail_id=$(head -1 ${_tmp_jail})


More information about the svn-src-stable-8 mailing list