diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-05-11 04:33:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-05-11 04:33:11 +0000 |
commit | 281a56958dcebee6cdac573b8448eaaa95a834ed (patch) | |
tree | 1c6b1b55168d8f598c91cecc0e7ef4b1686486b2 | |
parent | 602514826c54a7b0b1999bf5378e545344d0d3c2 (diff) |
Don't put floppy image in /tmp, use cwd like ramdisk image.
Only trim floppy image (via dd) if it is the wrong size.
-rw-r--r-- | distrib/alpha/ramdisk/Makefile | 13 |
1 files 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 |