Date: Sun, 22 Jan 2012 12:46:10 -0800 From: Garrett Cooper <yanegomi@gmail.com> To: Dirk Engling <erdgeist@erdgeist.org> Cc: simon <simon@nitro.dk>, Brooks Davis <brooks@freebsd.org>, freebsd-rc@freebsd.org Subject: Re: Bumping a pet bug Message-ID: <CAGH67wRHCwrnx408T4BERsqfDKGc8MgkSqJmcRCKPk0nGxdHHw@mail.gmail.com> In-Reply-To: <alpine.BSF.2.00.1201221439570.96980@erdgeist.org> References: <4F14F4FF.902@erdgeist.org> <20120120230300.GE87357@lor.one-eyed-alien.net> <cf3505af4577b689ea951e21ef51bcb5@nitro.dk> <20120121233757.GB31224@deviant.kiev.zoral.com.ua> <d56e9dd1453df77df868fa3cbb33a0ff@nitro.dk> <alpine.BSF.2.00.1201221439570.96980@erdgeist.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 22, 2012 at 5:46 AM, Dirk Engling <erdgeist@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 j= ust > 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 > =A0cannot 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wRHCwrnx408T4BERsqfDKGc8MgkSqJmcRCKPk0nGxdHHw>