From 281a56958dcebee6cdac573b8448eaaa95a834ed Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 11 May 1997 04:33:11 +0000 Subject: Don't put floppy image in /tmp, use cwd like ramdisk image. Only trim floppy image (via dd) if it is the wrong size. --- distrib/alpha/ramdisk/Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/distrib/alpha/ramdisk/Makefile b/distrib/alpha/ramdisk/Makefile index f30a7d6a70b..6214e669d5d 100644 --- a/distrib/alpha/ramdisk/Makefile +++ b/distrib/alpha/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 1997/05/09 19:06:10 millert Exp $ +# $OpenBSD: Makefile,v 1.7 1997/05/11 04:33:10 millert Exp $ TOP= ${.CURDIR}/.. @@ -15,7 +15,7 @@ VND_DEV= /dev/${VND}a VND_RDEV= /dev/r${VND}a VND_CRDEV= /dev/r${VND}c PID!= echo $$$$ -REALIMAGE!= echo /tmp/image.${PID} +REALIMAGE!= echo image.${PID} STRIP?= strip GZIP?= gzip @@ -61,9 +61,12 @@ ${FLOPPY}: bsd.gz @cmp bsd.gz ${MOUNT_POINT}/bsd || echo "Warning! /bsd corrupted!!!" umount ${MOUNT_POINT} vnconfig -u ${VND} - # some bug can put an extra 8k at the end it seems - dd if=${REALIMAGE} of=${FLOPPY} count=${FLOPPYBLKS} - rm -f ${REALIMAGE} + if test `env BLOCKSIZE=512 du -s ${REALIMAGE} | cut -f1` -eq ${FLOPPYBLKS}; then \ + mv ${REALIMAGE} ${FLOPPY} ; \ + else \ + dd if=${REALIMAGE} of=${FLOPPY} count=${FLOPPYBLKS} ; \ + rm -f ${REALIMAGE} ; \ + fi bsd.gz: ${KERNEL} ${IMAGE} ecoffrdsetroot cp ${KERNEL} bsd -- cgit v1.2.3