PR pkg/45799

* Use "mount -t nullfs" on FreeBSD, instead of "mount -t null".
* On Linux, for creating /dev/*, use "mount --bind".

Tested on FreeBSD/i386 9.0-RC3 and 9.0-RELEASE, CentOS/i386 6.2, 5.4,
and Gentoo Linux/i386 (Linux kernel 3).

O.K.ed by wiz@
This commit is contained in:
ryoon 2012-01-15 13:34:28 +00:00
parent ead94c212e
commit dac70aa4d5

View file

@ -1,6 +1,6 @@
#! /bin/sh
# $NetBSD: mksandbox,v 1.52 2009/09/20 10:24:00 wiz Exp $
# $NetBSD: mksandbox,v 1.53 2012/01/15 13:34:28 ryoon Exp $
#
#
# Copyright (c) 2002 Alistair G. Crooks. All rights reserved.
@ -80,6 +80,19 @@ Darwin)
paxprog=/bin/pax
sedprog=/usr/bin/sed
;;
FreeBSD)
bmakeprog=bmake
chmodprog=/bin/chmod
chownprog=/usr/sbin/chown
cpprog=/bin/cp
gtarprog=/usr/bin/tar
idprog=/usr/bin/id
mkdirprog="/bin/mkdir -p"
mountflags="-t nullfs"
mountprog=/sbin/mount
paxprog=/bin/pax
sedprog=/usr/bin/sed
;;
Interix)
echo >&2 "This script cannot be used on Interix; a different procedure is required."
echo >&2 "(To be documented.)"
@ -235,8 +248,7 @@ SunOS)
fi
;;
Linux)
$cpprog /dev/MAKEDEV* $sandbox/dev
(cd $sandbox/dev; ./MAKEDEV generic random)
$mountprog $mountflags /dev $sandbox/dev
;;
FreeBSD)
$mountprog -t devfs devfs $sandbox/dev