From cc1affd78372155eb8984d1e5d1ff1822efb3eb3 Mon Sep 17 00:00:00 2001 From: ryoon Date: Sun, 15 Jan 2012 13:34:28 +0000 Subject: 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@ --- mk/bulk/mksandbox | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'mk') diff --git a/mk/bulk/mksandbox b/mk/bulk/mksandbox index 28210495884..0826afca6ba 100755 --- a/mk/bulk/mksandbox +++ b/mk/bulk/mksandbox @@ -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 -- cgit v1.2.3