From f7e8401c0ddbe2ddff0ff1c20eb98fc1e03482a8 Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 10 Jun 2009 01:28:10 +0000 Subject: Count existing vlan's so restarting the script doesn't lose track of which vlan to create next. --- distrib/miniroot/install.sub | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index fef599b222d..21173a8f202 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.579 2009/06/10 00:53:40 deraadt Exp $ +# $OpenBSD: install.sub,v 1.580 2009/06/10 01:28:10 krw 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 @@ -564,6 +564,11 @@ __EOT configure_ifs() { local _first _ifdevs _ifs _name _hn _vl=0 _vd _vi _p _tags + # In case of restart, discover last vlan configured. + while ifconfig vlan$_vl >/dev/null 2>&1; do + : $(( _vl++ )) + done + while :; do # Create new vlan if possible. ifconfig vlan$_vl create >/dev/null 2>&1 -- cgit v1.2.3-59-g8ed1b