From owner-svn-src-all@freebsd.org Wed Oct 12 20:50:19 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 307BEC0E25E; Wed, 12 Oct 2016 20:50:19 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4409AEF; Wed, 12 Oct 2016 20:50:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9CKoHgs070627; Wed, 12 Oct 2016 20:50:17 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9CKoHSu070624; Wed, 12 Oct 2016 20:50:17 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201610122050.u9CKoHSu070624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 12 Oct 2016 20:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307159 - in head/etc: defaults rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 20:50:19 -0000 Author: dteske Date: Wed Oct 12 20:50:17 2016 New Revision: 307159 URL: https://svnweb.freebsd.org/changeset/base/307159 Log: Many shops still prefer rc.conf(5) based jail configuration(s). In-part because they can use sysrc in conjunction with ssh and xargs to perform en-masse changes in a large distribution with lots of jails spread over many hosts on a LAN/WAN. Provide a mechanism for disabling the warning eschewed by /etc/rc.d/jail in said situation. If jail_confwarn="NO" is in rc.conf(5) (default "YES") skip the warning that per-jail configurations are obsolete and that the user should migrate to jail.conf(5). Reviewed by: jelischer MFC after: 3 days Sponsored by: FIS Global, Inc. Differential Revision: https://reviews.freebsd.org/D7465 Modified: head/etc/defaults/rc.conf head/etc/rc.d/jail Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Wed Oct 12 20:50:13 2016 (r307158) +++ head/etc/defaults/rc.conf Wed Oct 12 20:50:17 2016 (r307159) @@ -695,6 +695,7 @@ iovctl_files="" # Config files for iovc ### Jail Configuration (see rc.conf(5) manual page) ########## ############################################################## jail_enable="NO" # Set to NO to disable starting of any jails +jail_confwarn="YES" # Prevent warning about obsolete per-jail configuration jail_parallel_start="NO" # Start jails in the background jail_list="" # Space separated list of names of jails jail_reverse_stop="NO" # Stop jails in reverse order Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Wed Oct 12 20:50:13 2016 (r307158) +++ head/etc/rc.d/jail Wed Oct 12 20:50:17 2016 (r307159) @@ -147,7 +147,8 @@ parse_options() # # To relieve confusion, show a warning message. # - _confwarn=1 + : ${jail_confwarn:=YES} + checkyesno jail_confwarn && _confwarn=1 if [ -r "$jail_conf" -o -r "$_jconf" ]; then if ! checkyesno jail_parallel_start; then warn "$_conf is created and used for jail $_j."