rc.d/jail and jail.conf

Dirk Engling erdgeist at erdgeist.org
Sun Mar 31 18:45:19 UTC 2013


On 30.03.13 21:38, Miroslav Lachman wrote:

> jail_myjail_flags="-l -U root -n myjail"

When trying to pass a my hostname (foo.com) as jailname like that,
jail(8) will complain

  jail: jail "foo" not found

as it does not allow periods in the jailname. This seems like an
unfortunate limitation, as I tend to name my jails after the fqdn they
are being started as.

FYI, the name=myjail form did not work, because rc.d/jail uses the

  path hostname [ip[,...]] command ...

synopsis of the jail command, which fails, if it sees name=value params.

So I guess, I am out of luck here, because users used to think of their
jails as what they saw in the hostname field on jls. If I am writing
tools that use jail_getid to map the jailname to the jid, it will never
match that hostname and I also can not copy the hostname to the jailname.

Is there a reason for '.' being the only excluded character in the jailname?

  erdgeist


More information about the freebsd-jail mailing list