Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Dec 2024 23:22:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        jail@FreeBSD.org
Subject:   [Bug 260248] jails: depend parameter does not work in modular jail files (conf.d)
Message-ID:  <bug-260248-29815-ULWPX9ozkI@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-260248-29815@https.bugs.freebsd.org/bugzilla/>
References:  <bug-260248-29815@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260248

crest@rlwinm.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crest@rlwinm.de

--- Comment #7 from crest@rlwinm.de ---
The problem is that the support for /etc/jail.conf.d/$name was implemented
inside the rc.d script instead of jail.conf. Inside said script each jail is
started/stopped by invoking jail -f $conf ... $name. The other config files
aren't read so separate invocations of the jail command don't know about ea=
ch
others configuration. It was a useful hack at the time, but FreeBSD =E2=89=
=A5 14.0
support native .include directives with globs. The proper solution is to put
something like this in your /etc/jail.conf:

    .include "/usr/local/etc/jail[.]conf";   # load local defaults
    .include "/etc/jail.d/*.conf";           # don't have /etc/jail.conf.d
because
    .include "/usr/local/etc/jail.d/*.conf"; # it triggers the rc.d workaro=
und.

You can't just have the rc.d script generate a jail.conf(5) that includes a=
ll
configs in /etc/jail.conf.d, because the global variable would carry over
between files which would be a massive POLA violation.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-260248-29815-ULWPX9ozkI>