Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Feb 2004 13:39:59 +0100
From:      des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To:        "Dan Langille" <dan@langille.org>
Cc:        marcel@FreeBSD.org
Subject:   Re: Jail for emulators/linux_base
Message-ID:  <xzp4qu13fts.fsf@dwp.des.no>
In-Reply-To: <4024F2B3.16448.B4BF9D9@localhost> (Dan Langille's message of "Sat, 07 Feb 2004 14:14:11 -0500")
References:  <4024F2B3.16448.B4BF9D9@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
"Dan Langille" <dan@langille.org> writes:
> In emulators/linux_base/Makefile, I see this:
>
> .if !defined(BATCH) && !exists(${LINUXBASE}/dev/null)
>         @${ECHO_MSG} ""
>         @${ECHO_MSG} "You need to create the null device in your=20
> jailed Linux environment. Run this"
>         @${ECHO_MSG} "outside the jail, then press enter:"
>         @${ECHO_MSG} ""
>         @${ECHO_MSG} "mkdir -m 0755 -p <Jail root dir>/dev"
>         @${ECHO_MSG} "rm -f <Jail root dir>${LINUXBASE}/dev/null"
>         @${ECHO_MSG} "mknod <Jail root dir>${LINUXBASE}/dev/null c 2=20
> 2"
>         @${ECHO_MSG} "chmod 666 <Jail root dir>${LINUXBASE}/dev/null"
>         @${ECHO_MSG} ""
>         @${SH} -c "read line"
> .endif
>
> Would it not be better to use ${LINUXBASE} instead of <Jail root=20
> dir>?  As it stands, the user (namely me) has no idea where <Jail=20
> root dir> should be.

The entire check is bogus.  Outside a jail, you already have /dev/null
and therefore don't need to do anything.  Inside a jail, all you need
to do is 'cd /dev && sh MAKEDEV std' (on 4.x) or 'mount_devfs dev
/dev' (on 5.x), and FreeBSD processes need this just as much as Linux
processes.  In either case, you will never have ${LINUXBASE}/dev/null,
just /dev/null.  And finally, it would be trivial and far more user-
friendly for the Makefile to do the required mknod'ing itself rather
than require user intervention.

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp4qu13fts.fsf>