Bumping a pet bug
Garrett Cooper
yanegomi at gmail.com
Sun Jan 22 20:46:12 UTC 2012
On Sun, Jan 22, 2012 at 5:46 AM, Dirk Engling <erdgeist at erdgeist.org> wrote:
>
> On Sun, 22 Jan 2012, simon wrote:
>
>>> Just curious. Why devfs mounts can fail ?
>>
>>
>> If $JAIL/dev doesn't exist or if one has messed up the devfs rulset
>> configuration are two reasons I can think of.
>
>
> I guess that when you forget sudo, this is where you end up. The script just
> does not know when to quit. Other scenarios include situations where the
> jails mountpoint is for some reasons unavailable.
>
> Here is the output I get from not running the jail script as root:
>
> Starting jails:mount_nullfs: Operation not permitted
> devfs rule: ioctl DEVFSIO_RGETNEXT: Operation not permitted
> mount: dev : Operation not permitted
> /etc/rc.d/jail: WARNING: devfs_domount(): Unable to mount devfs on
> /usr/jails/foo.com/dev
> /etc/rc.d/jail: WARNING: devfs_mount_jail: devfs was not mounted on
> /usr/jails/foo.com/dev
> ln: log: Permission denied
> mount: /usr/jails/foo.com/dev/fd: No such file or directory
> mount: proc : Operation not permitted
> cannot start jail "foo_com":
Probably a simple case of lack of set -e in the script with
appropriate error catching logic. The jailme and portsjail [*] scripts
had similar issues.
Thanks,
-Garrett
[*] I submitted a patch to make portsjail set -e aware:
http://trac.pcbsd.org/ticket/487
More information about the freebsd-rc
mailing list