Page MenuHomeFreeBSD

Make warning configurable for obsolete per-jail configuration
ClosedPublic

Authored by dteske on Aug 10 2016, 11:55 PM.

Details

Summary

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

Test Plan

Setup per-jail configurations in an rc.conf(5) style.
See https://svnweb.freebsd.org/base/head/share/examples/jails/README

% service jail restart

You'll get the following warning at the end...

/etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables \
is obsolete. Please consider migrating to /etc/jail.conf.

% sysrc jail_confwarn=NO
% service jail restart

The warning should no longer appear.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dteske updated this revision to Diff 19191.Aug 10 2016, 11:55 PM
dteske retitled this revision from to Make warning configurable for obsolete per-jail configuration.
dteske updated this object.
dteske edited the test plan for this revision. (Show Details)
dteske added a reviewer: julian.
dteske added a subscriber: allanjude.
julian accepted this revision.Oct 12 2016, 8:46 PM
julian edited edge metadata.

shipit

This revision is now accepted and ready to land.Oct 12 2016, 8:46 PM
This revision was automatically updated to reflect the committed changes.