From 5632c57462e33e30954200fe30a3baeac84d3efd Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 30 Apr 2009 00:28:23 +0000 Subject: if the kernel is a -current kernel, change the default path to snapshots --- distrib/miniroot/install.sub | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'distrib') diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 1c06b2c09ac..d3db12abf7f 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.499 2009/04/29 22:45:20 deraadt Exp $ +# $OpenBSD: install.sub,v 1.500 2009/04/30 00:28:22 deraadt Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -1761,6 +1761,11 @@ done # Extract and save one boot's worth of dmesg dmesg | sed -ne '/^OpenBSD /h;/^OpenBSD /!H;${g;p;}' >/var/run/dmesg.boot +# Are we in a real release, or a snapshot? If this is a snapshot +# install media, default us to a snapshot directory. +CURRENT=$(scan_dmesg '/^OpenBSD 4.5\([^ ]*\).*$/s//\1/p') +[[ -n $CURRENT ]] && SETDIR=snapshots/$ARCH + # Scan /var/run/dmesg.boot for interesting devices. DKDEVS=$(scan_disknames "${MDDKDEVS:-/^[sw]d[0-9][0-9]* /s/ .*//p}") CDDEVS=$(scan_disknames "${MDCDDEVS:-/^cd[0-9][0-9]* /s/ .*//p}") -- cgit v1.2.3