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
This commit is contained in:
Devin Teske 2016-10-12 20:50:17 +00:00
parent bdc7291ec9
commit d119e0f7fb
2 changed files with 3 additions and 1 deletions

View File

@ -695,6 +695,7 @@ iovctl_files="" # Config files for iovctl(8)
### 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

View File

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