From owner-svn-src-head@FreeBSD.ORG Fri Mar 5 14:34:33 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87FCE1065674; Fri, 5 Mar 2010 14:34:33 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7565D8FC16; Fri, 5 Mar 2010 14:34:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o25EYXHV024379; Fri, 5 Mar 2010 14:34:33 GMT (envelope-from netchild@svn.freebsd.org) Received: (from netchild@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o25EYXBR024375; Fri, 5 Mar 2010 14:34:33 GMT (envelope-from netchild@svn.freebsd.org) Message-Id: <201003051434.o25EYXBR024375@svn.freebsd.org> From: Alexander Leidinger Date: Fri, 5 Mar 2010 14:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204759 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 14:34:33 -0000 Author: netchild Date: Fri Mar 5 14:34:33 2010 New Revision: 204759 URL: http://svn.freebsd.org/changeset/base/204759 Log: 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. Revert the current behavior of starting jails in the background and make it optional only for the start of jails (jail_parallell_start=YES in rc.conf): - The stop can not be done in the background, the system needs to wait until everything is stopped correctly before it can reboot or power down. - The start should not be done in parallel by default, this not only breaks POLA for people comming from RELENG_x, it may also break a dependency chain with other scripts in the jail-host, which need to do some stuff after the jails are up and running (e.g. hardlinking a mysql socket from one jail into another one). Discussed on: freebsd-jails@ Modified: head/etc/defaults/rc.conf head/etc/rc.d/jail head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Mar 5 14:13:58 2010 (r204758) +++ head/etc/defaults/rc.conf Fri Mar 5 14:34:33 2010 (r204759) @@ -637,6 +637,7 @@ mixer_enable="YES" # Run the sound mixer ### Jail Configuration ####################################### ############################################################## jail_enable="NO" # Set to NO to disable starting of any jails +jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails jail_set_hostname_allow="YES" # Allow root user in a jail to change its hostname jail_socket_unixiproute_only="YES" # Route only TCP/IP within a jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Fri Mar 5 14:13:58 2010 (r204758) +++ head/etc/rc.d/jail Fri Mar 5 14:34:33 2010 (r204759) @@ -636,7 +636,8 @@ jail_start() done eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ - \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 + \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \ +