summaryrefslogtreecommitdiff
path: root/mk/bulk
diff options
context:
space:
mode:
authorcjep <cjep@pkgsrc.org>2002-12-31 15:09:01 +0000
committercjep <cjep@pkgsrc.org>2002-12-31 15:09:01 +0000
commitc892115b8eb3f4ca8b0471a05da81379504de67d (patch)
treef5db516f059986797115e228303c3551f6caa637 /mk/bulk
parentbd8b4c9da721a9502334ec6019b1983db43f5d55 (diff)
downloadpkgsrc-c892115b8eb3f4ca8b0471a05da81379504de67d.tar.gz
1. On SunOS populate /dev in the sandbox with devfsadm and ucblinks.
2. Introduce sandboxDirs, a list of directories that need to be null mounted. This is different (e.g. on SunOS).
Diffstat (limited to 'mk/bulk')
-rwxr-xr-xmk/bulk/mksandbox41
1 files changed, 20 insertions, 21 deletions
diff --git a/mk/bulk/mksandbox b/mk/bulk/mksandbox
index 593dfd092b1..6db1d54d1af 100755
--- a/mk/bulk/mksandbox
+++ b/mk/bulk/mksandbox
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: mksandbox,v 1.14 2002/12/31 13:52:50 cjep Exp $
+# $NetBSD: mksandbox,v 1.15 2002/12/31 15:09:01 cjep Exp $
#
#
# Copyright (c) 2002 Alistair G. Crooks. All rights reserved.
@@ -42,6 +42,8 @@
pkgsrc=/usr/pkgsrc
src=/usr/src
+sandboxDirs="/bin /sbin /lib /libexec /usr/X11R6 /usr/bin /usr/games /usr/include /usr/lib /usr/libdata /usr/libexec /usr/lkm /usr/share /usr/sbin /var/mail"
+
opsys=`uname -s`
case "$opsys" in
Darwin)
@@ -95,6 +97,7 @@ SunOS)
mountprog=/sbin/mount
paxprog=/bin/pax
sedprog=/usr/xpg4/bin/sed
+ sandboxDirs="/bin /sbin /lib /usr/X11R6 /usr/bin /usr/games /usr/include /usr/lib /usr/openwin /usr/share /usr/sbin /var/mail"
;;
*)
echo "Unknown Operating System ($opsys) - good luck"
@@ -167,8 +170,18 @@ $mkdirprog $sandbox/$localbase $sandbox/$pkg_dbdir
echo "Make and populate $sandbox/dev"
$mkdirprog $sandbox/dev
-$cpprog /dev/MAKEDEV* $sandbox/dev
-(cd $sandbox/dev; ./MAKEDEV all)
+
+case "$opsys" in
+SunOS)
+ /usr/sbin/devfsadm -r $sandbox
+ if [ -f /usr/ucblib/ucblinks.awk -a -x /usr/ucb/ucblinks ]; then
+ /usr/ucb/ucblinks -r $sandbox
+ fi
+ ;;
+*)
+ $cpprog /dev/MAKEDEV* $sandbox/dev
+ (cd $sandbox/dev; ./MAKEDEV all)
+esac
echo "Make and populate $sandbox/etc"
$mkdirprog $sandbox/etc
@@ -180,24 +193,10 @@ rm -f $sandbox/etc/localtime
$cpprog /usr/share/zoneinfo/GMT $sandbox/etc/localtime
echo "Make empty dirs upon which to mount the null mounts"
-for d in /bin \
- /sbin \
- /lib \
- /libexec \
- /usr/X11R6 \
- /usr/bin \
- /usr/games \
- /usr/include \
- /usr/lib \
- /usr/libdata \
- /usr/libexec \
- /usr/lkm \
- /usr/share \
- /usr/sbin \
- /var/mail; do \
- test -d $d || continue; \
- $mkdirprog $sandbox$d; \
- $mountprog $mountflags -r $d $sandbox$d; \
+for d in $sandboxDirs; do
+ test -d $d || continue;
+ $mkdirprog $sandbox$d;
+ $mountprog $mountflags -r $d $sandbox$d;
echo "$d $d ro \\" >> $sandbox_script
done