diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-29 20:30:54 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-29 20:30:54 +0000 |
commit | c150b7be2ceddce206478da1bd7459bb6a406f0b (patch) | |
tree | d6eb2d9e840f61cdf44e85d8787a4ffebab3d65f /distrib/miniroot | |
parent | 40868c373279c8473cdcce2193879981b3261856 (diff) |
If we netbooted, use that interface as the default choice in the interface
selector
ok sthen
Diffstat (limited to 'distrib/miniroot')
-rw-r--r-- | distrib/miniroot/install.sub | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index d19c199dabe..48a2716b331 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.495 2009/04/29 18:10:54 deraadt Exp $ +# $OpenBSD: install.sub,v 1.496 2009/04/29 20:30:53 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 @@ -600,9 +600,13 @@ configure_ifs() { _vl="vlan$_vli" fi - # First time, default value is first interface - set -- $IFDEVS - _p=$1 + # Select the default interface + if ifconfig netboot >/dev/null 2>&1; then + _p=$(ifconfig netboot | sed -ne '1s/:.*//p') + else + set -- $IFDEVS + _p=$1 + fi while [[ -n $_IFDEVS ]]; do ask_which "network interface" "do you wish to configure" \ |