svn commit: r307159 - in head/etc: defaults rc.d

Devin Teske dteske at FreeBSD.org
Wed Oct 12 20:50:19 UTC 2016


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."


More information about the svn-src-head mailing list