summaryrefslogtreecommitdiff
path: root/distrib/alpha/iso
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-28 14:48:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-04-28 14:48:12 +0000
commit1c24a7b4a2202b4c466248a03b661fcf6c40e35e (patch)
tree2214f1f048822bc64f69b522c02a32f6e17d0c80 /distrib/alpha/iso
parentbaeb4d23783efa1dd62e7c43c3296b8e6fad6a0d (diff)
Use new vnconfig vnd-auto-allocate mode. Resolve some variation between
architectures, and start removing some crazy junk that has collected over the years. Being tested on all architectures... ok various people.
Diffstat (limited to 'distrib/alpha/iso')
-rw-r--r--distrib/alpha/iso/Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/distrib/alpha/iso/Makefile b/distrib/alpha/iso/Makefile
index 82dbd82adef..4baa75824d9 100644
--- a/distrib/alpha/iso/Makefile
+++ b/distrib/alpha/iso/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.15 2014/09/21 13:44:44 deraadt Exp $
+# $OpenBSD: Makefile,v 1.16 2019/04/28 14:48:09 deraadt Exp $
TOP= ${.CURDIR}/..
@@ -7,6 +7,7 @@ TOP= ${.CURDIR}/..
CDROM= install${OSrev}.iso
RELXDIR?= /home/relx-${MACHINE}
RELDIR?= /home/rel-${MACHINE}
+MOUNT_POINT= /mnt
BASE= ${RELDIR}/base${OSrev}.tgz ${RELDIR}/comp${OSrev}.tgz \
${RELDIR}/game${OSrev}.tgz ${RELDIR}/man${OSrev}.tgz \
@@ -41,14 +42,15 @@ ${CDROM}: ${BASE} ${XBASE}
-p "Theo de Raadt <deraadt@openbsd.org>" \
-V "OpenBSD/${MACHINE} ${OSREV} Install CD" \
${.OBJDIR}/cd-dir 2>&1) | tee log
- vnconfig -v -c vnd0 ${.OBJDIR}/${CDROM}
- mount -t cd9660 /dev/vnd0a /mnt
+ vnconfig -v ${CDROM} > vnd
+ mount -t cd9660 /dev/`cat vnd`a ${MOUNT_POINT}
/usr/mdec/installboot -v \
-s `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f1` \
-e `cat log | grep -v 'Name' | egrep "/cd-dir/${OSREV}/${MACHINE}/boot$$" | cut -d' ' -f2` \
- /mnt/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx /dev/rvnd0c
- umount /mnt
- vnconfig -u vnd0
+ ${MOUNT_POINT}/${OSREV}/${MACHINE}/boot /usr/mdec/bootxx `cat vnd`
+ umount ${MOUNT_POINT}
+ vnconfig -u `cat vnd`
+ rm -f vnd
install:
cp ${CDROM} ${RELDIR}/
@@ -58,8 +60,8 @@ clean cleandir:
rm -rf cd-dir log
unconfig:
- -umount /mnt
- -vnconfig -u vnd0
+ -umount -f ${MOUNT_POINT}
+ -[ -f vnd ] && vnconfig -u `cat vnd` && rm -f vnd
.include <bsd.obj.mk>
.include <bsd.subdir.mk>