diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-30 00:28:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-30 00:28:23 +0000 |
commit | 5632c57462e33e30954200fe30a3baeac84d3efd (patch) | |
tree | 87504549250801d155fc615440ed68caf4fc9a12 /distrib | |
parent | 0102b044b84b25f5038d355c6342fd54803bd645 (diff) |
if the kernel is a -current kernel, change the default path to snapshots
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/install.sub | 7 |
1 files changed, 6 insertions, 1 deletions
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}") |