Enhancements to the new rc.d/jail script

Scot W. Hetzel hetzels at westbend.net
Mon Apr 21 10:59:48 PDT 2003


From: "Doug Barton" <DougB at freebsd.org>
> On Mon, 21 Apr 2003, Scot W. Hetzel wrote:
>
> > If a sys admin defines ruleset 10 in /etc/rc.devfs, then either the 2
will
> > be merged or the rc.d/devfs ruleset will be overwritten (if "/sbin/devfs
> > rule -s 10 delset" is in /etc/rc.devfs).
>
> Thanks for the clarification. I think that this has enough foot-shooting
> potential that it should probably be hidden behind a knob in rc.conf.
>

What do you think of the following changes?

/etc/defaults/rc.conf
    :
    devfs_jail_ruleset_enable    # Enable Standard Jail ruleset
    devfs_jail_ruleset_num='666'  # Standard Jail ruleset number (change if
it conflicts with your rulesets)
                                              # Also change
jail_default_ruleset to match.
    :
    jail_default_ruleset='666'    # Default ruleset to apply to a jail if
devfs enabled and no ruleset specified.
    :

/etc/rc.d/devfs
    :
    # Standard Jail ruleset
    if checkyesno devfs_jail_ruleset_enable ; then
        /sbin/devfs -s ${devfs_jail_ruleset_num} delset
        :
        :
    fi
    :

We could also enable the Standard Jail ruleset when jail_enable is set.

Scot




More information about the freebsd-current mailing list