cdrom(): Look for the `instfs.tgz' image in the $MACHINE subdirectory of

the CD-R root first.
This commit is contained in:
pk 2000-11-28 21:51:09 +00:00
parent 366b23111a
commit 13b10eb901
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: dot.profile,v 1.14 2000/11/06 23:17:45 pk Exp $
# $NetBSD: dot.profile,v 1.15 2000/11/28 21:51:09 pk Exp $
#
# Copyright (c) 2000 The NetBSD Foundation, Inc.
# All rights reserved.
@ -42,6 +42,7 @@ export HOME
umask 022
MACHINE=sparc
INSTFS_MP=/instfs
MINIROOT_FSSIZE=10000
@ -152,8 +153,13 @@ EOF
mount_cd9660 -o rdonly $dev /cdrom || return 1
tf=/cdrom/installation/bootfs/instfs.tgz
(cd $INSTFS_MP && tar zxpf $tf) || rval=1
# Look for instfs.tgz in MACHINE subdirectory first
tf=/cdrom/$MACHINE/installation/bootfs/instfs.tgz
[ -f $tf ] || tf=/cdrom/installation/bootfs/instfs.tgz
[ -f $tf ] || { echo "instfs.tgz image not found"; rval=1; }
[ $rval = 0 ] && (cd $INSTFS_MP && tar zxpf $tf) || rval=1
umount /cdrom
return $rval
}