Tue Jul 3 12:05:40 2012 UTC ()
Update for OSX Lion.

OSX hasn't included the ability to loopback mount for a while, so introduce
NFS support, configurable via a new --mounthost option, and add additional
directories required for proper support.

This mostly works, however something is causing name lookups to fail in the
chroot and it will currently only look at /etc/hosts.  Clue appreciated here.

Also fix /dev mounting/unmounting from the sandbox script.


(jperkin)
diff -r1.53 -r1.54 pkgsrc/mk/bulk/mksandbox

cvs diff -r1.53 -r1.54 pkgsrc/mk/bulk/Attic/mksandbox (expand / switch to unified diff)

--- pkgsrc/mk/bulk/Attic/mksandbox 2012/01/15 13:34:28 1.53
+++ pkgsrc/mk/bulk/Attic/mksandbox 2012/07/03 12:05:40 1.54
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: mksandbox,v 1.53 2012/01/15 13:34:28 ryoon Exp $ 3# $NetBSD: mksandbox,v 1.54 2012/07/03 12:05:40 jperkin Exp $
4# 4#
5# 5#
6# Copyright (c) 2002 Alistair G. Crooks. All rights reserved. 6# Copyright (c) 2002 Alistair G. Crooks. All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 3. All advertising materials mentioning features or use of this software 16# 3. All advertising materials mentioning features or use of this software
@@ -41,54 +41,57 @@ @@ -41,54 +41,57 @@
41 41
42pkgsrc=/usr/pkgsrc 42pkgsrc=/usr/pkgsrc
43src=/usr/src 43src=/usr/src
44xsrc=/usr/xsrc 44xsrc=/usr/xsrc
45with_x=yes 45with_x=yes
46 46
47kernel="" 47kernel=""
48sandboxMountDirs="/bin /sbin /lib /libexec /usr/X11R7 /usr/bin /usr/games /usr/include /usr/lib /usr/libdata /usr/libexec /usr/lkm /usr/share /usr/sbin /var/mail" 48sandboxMountDirs="/bin /sbin /lib /libexec /usr/X11R7 /usr/bin /usr/games /usr/include /usr/lib /usr/libdata /usr/libexec /usr/lkm /usr/share /usr/sbin /var/mail"
49sandboxEmptyDirs="/var/run /var/log /var/spool/lock /var/spool/mqueue" 49sandboxEmptyDirs="/var/run /var/log /var/spool/lock /var/spool/mqueue"
50sandboxEmptyFiles="/var/run/utmp /var/run/utmpx /var/log/wtmp /var/log/wtmpx /var/log/lastlog /var/log/lastlogx" 50sandboxEmptyFiles="/var/run/utmp /var/run/utmpx /var/log/wtmp /var/log/wtmpx /var/log/lastlog /var/log/lastlogx"
51 51
52usage() 52usage()
53{ 53{
54 echo "Usage: mksandbox [--pkgsrc=dir] [--src=srcdir] [--xsrc=xsrcdir] [--without-x] [--verbose] sandbox-dir" 54 echo "Usage: mksandbox [--mounthost=host] [--pkgsrc=dir] [--src=srcdir] [--xsrc=xsrcdir] [--without-x] [--verbose] sandbox-dir"
55 exit 1 55 exit 1
56} 56}
57 57
58err() 58err()
59{ 59{
60 echo "error: $1" 60 echo "error: $1"
61 exit 1 61 exit 1
62} 62}
63 63
64# by default, don't require src and xsrc to be available 64# by default, don't require src and xsrc to be available
65need_src=no 65need_src=no
66need_xsrc=no 66need_xsrc=no
67 67
68opsys=`uname -s` 68opsys=`uname -s`
69case "$opsys" in 69case "$opsys" in
70Darwin) 70Darwin)
71 bmakeprog=bmake 71 bmakeprog=bmake
72 chmodprog=/bin/chmod 72 chmodprog=/bin/chmod
73 chownprog=/usr/sbin/chown 73 chownprog=/usr/sbin/chown
74 cpprog=/bin/cp 74 cpprog=/bin/cp
75 gtarprog=/usr/bin/gnutar 75 gtarprog=/usr/bin/gnutar
76 idprog=/usr/bin/id 76 idprog=/usr/bin/id
77 mkdirprog="/bin/mkdir -p" 77 mkdirprog="/bin/mkdir -p"
78 mountflags="-t null" 78 mountflags="-t nfs"
 79 mounthost="localhost"
79 mountprog=/sbin/mount 80 mountprog=/sbin/mount
80 paxprog=/bin/pax 81 paxprog=/bin/pax
81 sedprog=/usr/bin/sed 82 sedprog=/usr/bin/sed
 83 sandboxEmptyDirs="$sandboxEmptyDirs /var/root"
 84 sandboxMountDirs="$sandboxMountDirs /usr/llvm-gcc-4.2 /System/Library /Library"
82 ;; 85 ;;
83FreeBSD) 86FreeBSD)
84 bmakeprog=bmake 87 bmakeprog=bmake
85 chmodprog=/bin/chmod 88 chmodprog=/bin/chmod
86 chownprog=/usr/sbin/chown 89 chownprog=/usr/sbin/chown
87 cpprog=/bin/cp 90 cpprog=/bin/cp
88 gtarprog=/usr/bin/tar 91 gtarprog=/usr/bin/tar
89 idprog=/usr/bin/id 92 idprog=/usr/bin/id
90 mkdirprog="/bin/mkdir -p" 93 mkdirprog="/bin/mkdir -p"
91 mountflags="-t nullfs" 94 mountflags="-t nullfs"
92 mountprog=/sbin/mount 95 mountprog=/sbin/mount
93 paxprog=/bin/pax 96 paxprog=/bin/pax
94 sedprog=/usr/bin/sed 97 sedprog=/usr/bin/sed
@@ -155,75 +158,82 @@ SunOS) @@ -155,75 +158,82 @@ SunOS)
155 cpprog=cp 158 cpprog=cp
156 gtarprog="tar" 159 gtarprog="tar"
157 idprog="id" 160 idprog="id"
158 mkdirprog="mkdir -p" 161 mkdirprog="mkdir -p"
159 mountflags="-t null" 162 mountflags="-t null"
160 mountprog=mount 163 mountprog=mount
161 paxprog=pax 164 paxprog=pax
162 sedprog=sed 165 sedprog=sed
163 ;; 166 ;;
164esac 167esac
165 168
166while [ $# -gt 0 ]; do 169while [ $# -gt 0 ]; do
167 case "$1" in 170 case "$1" in
 171 --mounthost=*) mounthost=`echo $1 | $sedprog -e 's|^--mounthost=||'` ;;
168 --pkgsrc=*) pkgsrc=`echo $1 | $sedprog -e 's|^--pkgsrc=||'` ;; 172 --pkgsrc=*) pkgsrc=`echo $1 | $sedprog -e 's|^--pkgsrc=||'` ;;
169 --src=*) src=`echo $1 | $sedprog -e 's|^--src=||'` ;; 173 --src=*) src=`echo $1 | $sedprog -e 's|^--src=||'` ;;
170 --xsrc=*) xsrc=`echo $1 | $sedprog -e 's|^--xsrc=||'` ;; 174 --xsrc=*) xsrc=`echo $1 | $sedprog -e 's|^--xsrc=||'` ;;
171 --without-x) with_x=no ;; 175 --without-x) with_x=no ;;
172 --verbose) set -x ;; 176 --verbose) set -x ;;
173 -*) usage ;; 177 -*) usage ;;
174 *) break ;; 178 *) break ;;
175 esac 179 esac
176 shift 180 shift
177done 181done
178 182
179if [ $# -ne 1 ]; then 183if [ $# -ne 1 ]; then
180 usage 184 usage
181fi 185fi
182 186
183if [ "$with_x" = "no" ]; then 187if [ "$with_x" = "no" ]; then
184 need_xsrc=no 188 need_xsrc=no
185fi 189fi
186 190
187if [ `$idprog -u` -ne 0 ]; then 191if [ `$idprog -u` -ne 0 ]; then
188 err "You must be root to run this script." 192 err "You must be root to run this script."
189fi 193fi
190 194
 195if [ -n "$mounthost" ]; then
 196 mounthost="$mounthost:"
 197fi
 198
191if [ ! -d $pkgsrc ]; then 199if [ ! -d $pkgsrc ]; then
192 err "pkgsrc directory $pkgsrc does not exist." 200 err "pkgsrc directory $pkgsrc does not exist."
193fi 201fi
194 202
195if [ ! -d $src -a "$need_src" = "yes" ]; then 203if [ ! -d $src -a "$need_src" = "yes" ]; then
196 err "source directory $src does not exist." 204 err "source directory $src does not exist."
197fi 205fi
198 206
199if [ ! -d $xsrc -a "$need_xsrc" = "yes" ]; then 207if [ ! -d $xsrc -a "$need_xsrc" = "yes" ]; then
200 err "xsrc directory $xsrc does not exist." 208 err "xsrc directory $xsrc does not exist."
201fi 209fi
202 210
203sandbox=$1 211sandbox=$1
204sandbox_script="$sandbox/sandbox" 212sandbox_script="$sandbox/sandbox"
205 213
206packages=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=PACKAGES)` 214packages=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=PACKAGES)`
207distfiles=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=DISTDIR)` 215distfiles=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=DISTDIR)`
208localbase=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=LOCALBASE)` 216localbase=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=LOCALBASE)`
209pkg_dbdir=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=PKG_DBDIR)` 217pkg_dbdir=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=PKG_DBDIR)`
210localpatches=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=LOCALPATCHES)` 218localpatches=`(cd $pkgsrc/pkgtools/lintpkgsrc; $bmakeprog show-var VARNAME=LOCALPATCHES)`
211 219
212test -d "$localpatches" || echo "WARNING: LOCALPATCHES directory does not exist - ignoring" 220test -d "$localpatches" || echo "WARNING: LOCALPATCHES directory does not exist - ignoring"
213 221
214$mkdirprog $sandbox 222$mkdirprog $sandbox
215cat > $sandbox_script <<EOS 223cat > $sandbox_script <<EOS
216#! /bin/sh - 224#! /bin/sh -
 225mounthost=$mounthost
 226opsys=$opsys
217sandbox=$sandbox 227sandbox=$sandbox
218 228
219r3() { 229r3() {
220 _R= 230 _R=
221 while [ \$# -ge 3 ] 231 while [ \$# -ge 3 ]
222 do 232 do
223 _R="\$1 \$2 \$3 \$_R" 233 _R="\$1 \$2 \$3 \$_R"
224 shift; shift; shift 234 shift; shift; shift
225 done 235 done
226 echo "\$_R" 236 echo "\$_R"
227} 237}
228 238
229fses="\\ 239fses="\\
@@ -231,38 +241,38 @@ EOS @@ -231,38 +241,38 @@ EOS
231 241
232if [ ! -z "$kernel" ]; then 242if [ ! -z "$kernel" ]; then
233 echo "Copying the kernel" 243 echo "Copying the kernel"
234 $cpprog $kernel $sandbox 244 $cpprog $kernel $sandbox
235fi 245fi
236 246
237echo "Checking package hierarchy in $localbase and package database in $pkg_dbdir exist" 247echo "Checking package hierarchy in $localbase and package database in $pkg_dbdir exist"
238$mkdirprog $sandbox/$localbase $sandbox/$pkg_dbdir 248$mkdirprog $sandbox/$localbase $sandbox/$pkg_dbdir
239 249
240echo "Make and populate $sandbox/dev" 250echo "Make and populate $sandbox/dev"
241$mkdirprog $sandbox/dev 251$mkdirprog $sandbox/dev
242 252
243case "$opsys" in 253case "$opsys" in
 254Darwin|FreeBSD)
 255 $mountprog -t devfs devfs $sandbox/dev
 256 ;;
244SunOS) 257SunOS)
245 /usr/sbin/devfsadm -r $sandbox 258 /usr/sbin/devfsadm -r $sandbox
246 if [ -f /usr/ucblib/ucblinks.awk -a -x /usr/ucb/ucblinks ]; then 259 if [ -f /usr/ucblib/ucblinks.awk -a -x /usr/ucb/ucblinks ]; then
247 /usr/ucb/ucblinks -r $sandbox 260 /usr/ucb/ucblinks -r $sandbox
248 fi 261 fi
249 ;; 262 ;;
250Linux) 263Linux)
251 $mountprog $mountflags /dev $sandbox/dev 264 $mountprog $mountflags /dev $sandbox/dev
252 ;; 265 ;;
253FreeBSD) 
254 $mountprog -t devfs devfs $sandbox/dev 
255 ;; 
256*) 266*)
257 $cpprog /dev/MAKEDEV* $sandbox/dev 267 $cpprog /dev/MAKEDEV* $sandbox/dev
258 (cd $sandbox/dev; ./MAKEDEV all) 268 (cd $sandbox/dev; ./MAKEDEV all)
259esac 269esac
260 270
261echo "Make and populate $sandbox/etc" 271echo "Make and populate $sandbox/etc"
262$mkdirprog $sandbox/etc 272$mkdirprog $sandbox/etc
263case "$paxprog" in 273case "$paxprog" in
264"") (cd /etc; $gtarprog -cf - . | (cd $sandbox/etc; $gtarprog xf - )) ;; 274"") (cd /etc; $gtarprog -cf - . | (cd $sandbox/etc; $gtarprog xf - )) ;;
265*) (cd /etc; $paxprog -rwpe . $sandbox/etc) ;; 275*) (cd /etc; $paxprog -rwpe . $sandbox/etc) ;;
266esac 276esac
267rm -f $sandbox/etc/localtime 277rm -f $sandbox/etc/localtime
268 278
@@ -272,28 +282,28 @@ SunOS) @@ -272,28 +282,28 @@ SunOS)
272 ;; 282 ;;
273*) 283*)
274 $cpprog /usr/share/zoneinfo/GMT $sandbox/etc/localtime 284 $cpprog /usr/share/zoneinfo/GMT $sandbox/etc/localtime
275 ;; 285 ;;
276esac 286esac
277 287
278echo "Make empty dirs upon which to mount the null mounts" 288echo "Make empty dirs upon which to mount the null mounts"
279for d in $sandboxMountDirs; do 289for d in $sandboxMountDirs; do
280 test -d $d || continue; 290 test -d $d || continue;
281 case $d in 291 case $d in
282 *X11*) test "$with_x" = "yes" || continue ;; 292 *X11*) test "$with_x" = "yes" || continue ;;
283 esac 293 esac
284 $mkdirprog $sandbox$d; 294 $mkdirprog $sandbox$d;
285 $mountprog $mountflags -r $d $sandbox$d; 295 $mountprog $mountflags -r $mounthost$d $sandbox$d;
286 echo "$d $d ro \\" >> $sandbox_script 296 echo "$mounthost$d $d ro \\" >> $sandbox_script
287done 297done
288 298
289echo "Making /tmp in $sandbox" 299echo "Making /tmp in $sandbox"
290$mkdirprog $sandbox/tmp $sandbox/var/tmp 300$mkdirprog $sandbox/tmp $sandbox/var/tmp
291$chmodprog 1777 $sandbox/tmp $sandbox/var/tmp 301$chmodprog 1777 $sandbox/tmp $sandbox/var/tmp
292 302
293echo "Making /var/games in $sandbox" 303echo "Making /var/games in $sandbox"
294$mkdirprog $sandbox/var/games 304$mkdirprog $sandbox/var/games
295$chownprog games:games $sandbox/var/games 305$chownprog games:games $sandbox/var/games
296$chmodprog 2775 $sandbox/var/games 306$chmodprog 2775 $sandbox/var/games
297 307
298for d in $sandboxEmptyDirs; do 308for d in $sandboxEmptyDirs; do
299 test -d $d || continue 309 test -d $d || continue
@@ -306,98 +316,115 @@ for f in $sandboxEmptyFiles; do @@ -306,98 +316,115 @@ for f in $sandboxEmptyFiles; do
306 echo "Making $f in $sandbox" 316 echo "Making $f in $sandbox"
307 $cpprog /dev/null $sandbox$f 317 $cpprog /dev/null $sandbox$f
308done 318done
309 319
310if [ "$need_src" = "yes" ]; then 320if [ "$need_src" = "yes" ]; then
311 echo "Mount $src from $sandbox" 321 echo "Mount $src from $sandbox"
312 $mkdirprog $sandbox/usr/src 322 $mkdirprog $sandbox/usr/src
313 $mountprog $mountflags -r $src $sandbox/usr/src 323 $mountprog $mountflags -r $src $sandbox/usr/src
314 echo "$src /usr/src ro \\" >> $sandbox_script 324 echo "$src /usr/src ro \\" >> $sandbox_script
315fi 325fi
316 326
317echo "Mount $pkgsrc from $sandbox" 327echo "Mount $pkgsrc from $sandbox"
318$mkdirprog $sandbox/usr/pkgsrc 328$mkdirprog $sandbox/usr/pkgsrc
319$mountprog $mountflags $pkgsrc $sandbox/usr/pkgsrc 329$mountprog $mountflags $mounthost$pkgsrc $sandbox/usr/pkgsrc
320echo "$pkgsrc /usr/pkgsrc rw \\" >> $sandbox_script 330echo "$mounthost$pkgsrc /usr/pkgsrc rw \\" >> $sandbox_script
321 331
322if [ "$need_xsrc" = "yes" ]; then 332if [ "$need_xsrc" = "yes" ]; then
323 echo "Mount $xsrc from $sandbox" 333 echo "Mount $xsrc from $sandbox"
324 $mkdirprog $sandbox/usr/xsrc 334 $mkdirprog $sandbox/usr/xsrc
325 $mountprog $mountflags -r $xsrc $sandbox/usr/xsrc 335 $mountprog $mountflags -r $xsrc $sandbox/usr/xsrc
326 echo "$xsrc /usr/xsrc ro \\" >> $sandbox_script 336 echo "$xsrc /usr/xsrc ro \\" >> $sandbox_script
327fi 337fi
328 338
329echo "Mounting $packages and $distfiles from $sandbox" 339echo "Mounting $packages and $distfiles from $sandbox"
330$mkdirprog $sandbox/$packages $sandbox/$distfiles 340$mkdirprog $sandbox/$packages $sandbox/$distfiles
331$mkdirprog $packages $distfiles 341$mkdirprog $packages $distfiles
332$mountprog $mountflags $packages $sandbox/$packages 342$mountprog $mountflags $mounthost$packages $sandbox/$packages
333$mountprog $mountflags $distfiles $sandbox/$distfiles 343$mountprog $mountflags $mounthost$distfiles $sandbox/$distfiles
334echo "$packages $packages rw \\" >> $sandbox_script 344echo "$mounthost$packages $packages rw \\" >> $sandbox_script
335echo "$distfiles $distfiles rw \\" >> $sandbox_script 345echo "$mounthost$distfiles $distfiles rw \\" >> $sandbox_script
336 346
337if [ -n "$localpatches" ] && [ -d "$localpatches" ]; then 347if [ -n "$localpatches" ] && [ -d "$localpatches" ]; then
338 echo "Mounting $localpatches from $sandbox" 348 echo "Mounting $localpatches from $sandbox"
339 $mkdirprog $sandbox/$localpatches 349 $mkdirprog $sandbox/$localpatches
340 $mountprog $mountflags $localpatches $sandbox/$localpatches 350 $mountprog $mountflags $localpatches $sandbox/$localpatches
341 echo "$localpatches $localpatches rw \\" >> $sandbox_script 351 echo "$localpatches $localpatches rw \\" >> $sandbox_script
342fi 352fi
343 353
344cat >> $sandbox_script <<EOS 354cat >> $sandbox_script <<EOS
345" 355"
346case x\$1 in 356case x\$1 in
347 xmount) 357xmount)
348 set dummy \$fses 358 set dummy \$fses
349 shift 359 shift
350 while [ \$# -ge 3 ]; do 360 while [ \$# -ge 3 ]; do
351 fs=\$1; shift 361 fs=\$1; shift
352 mntpoint=\$1; shift 362 mntpoint=\$1; shift
353 rwro=\$1; shift 363 rwro=\$1; shift
354 case \$rwro in 364 case \$rwro in
355 ro) mount $mountflags -r \$fs \$sandbox/\$mntpoint || exit 1 ;; 365 ro) $mountprog $mountflags -r \$fs \$sandbox/\$mntpoint || exit 1 ;;
356 rw) mount $mountflags \$fs \$sandbox/\$mntpoint || exit 1 ;; 366 rw) $mountprog $mountflags \$fs \$sandbox/\$mntpoint || exit 1 ;;
357 esac 367 esac
358 done 368 done
 369 case \$opsys in
 370 Darwin|FreeBSD)
 371 $mountprog -t devfs devfs \$sandbox/dev
 372 ;;
 373 Linux)
 374 $mountprog $mountflags /dev \$sandbox/dev
 375 ;;
 376 esac
359 ;; 377 ;;
360 xumount) 378xumount)
361 set dummy \`r3 \$fses\` 379 set dummy \`r3 \$fses\`
362 shift 380 shift
363 while [ \$# -ge 3 ]; do 381 while [ \$# -ge 3 ]; do
364 fs=\$1; shift 382 fs=\$1; shift
365 mntpoint=\$1; shift 383 mntpoint=\$1; shift
366 dummy=\$1; shift 384 dummy=\$1; shift
367 umount \$sandbox/\$mntpoint 385 umount \$sandbox/\$mntpoint
368 done 386 done
 387 case \$opsys in
 388 Darwin|FreeBSD|Linux)
 389 umount \$sandbox/dev
 390 ;;
 391 esac
369 ;; 392 ;;
370 xchroot) 393xchroot)
371 case x\$2 in 394 case x\$2 in
372 x) rootshell=/bin/ksh ;; 395 x) rootshell=/bin/ksh ;;
373 *) rootshell="\$2" ;; 396 *) rootshell="\$2" ;;
374 esac 397 esac
375 script="\$sandbox/tmp/script.\$\$" 398 script="\$sandbox/tmp/script.\$\$"
376 echo "#!/bin/sh" > \$script 399 echo "#!/bin/sh" > \$script
377 echo "ENV=/etc/shrc \$rootshell" >> \$script 400 echo "ENV=/etc/shrc \$rootshell" >> \$script
378 chmod +x \$script 401 chmod +x \$script
379 ENV=/etc/shrc chroot \$sandbox /tmp/\`basename \$script\` 402 ENV=/etc/shrc chroot \$sandbox /tmp/\`basename \$script\`
380 rm -f \$script 403 rm -f \$script
381 ;; 404 ;;
382 *) 405*)
383 if [ \$# -eq 0 ]; then 406 if [ \$# -eq 0 ]; then
384 set dummy /bin/sh 407 set dummy /bin/sh
385 shift 408 shift
386 fi 409 fi
387 chroot \$sandbox "\$@" 410 chroot \$sandbox "\$@"
388 ;; 411 ;;
389esac 412esac
390EOS 413EOS
391 414
392chmod +x $sandbox_script 415chmod +x $sandbox_script
393 416
394case $opsys in 417case $opsys in
 418Darwin)
 419 $cpprog /var/run/resolv.conf $sandbox/var/run/resolv.conf
 420 $cpprog /mach_kernel $sandbox/mach_kernel
 421 ;;
395SunOS) 422SunOS)
396 $cpprog /etc/mnttab $sandbox/etc/mnttab 423 $cpprog /etc/mnttab $sandbox/etc/mnttab
397 ;; 424 ;;
398*) 425*)
399esac 426esac
400 427
401echo "Sandbox creation is now complete" 428echo "Sandbox creation is now complete"
402 429
403exit 0 430exit 0