From 13b10eb90116d273a03670a07382a01439201cb0 Mon Sep 17 00:00:00 2001 From: pk Date: Tue, 28 Nov 2000 21:51:09 +0000 Subject: [PATCH] cdrom(): Look for the `instfs.tgz' image in the $MACHINE subdirectory of the CD-R root first. --- distrib/sparc/ramdisk/dot.profile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/distrib/sparc/ramdisk/dot.profile b/distrib/sparc/ramdisk/dot.profile index 71ab1962553c..1f689fc56d7b 100644 --- a/distrib/sparc/ramdisk/dot.profile +++ b/distrib/sparc/ramdisk/dot.profile @@ -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 }