summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2009-06-10 01:28:11 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2009-06-10 01:28:11 +0000
commit2bc2b6103c65d8ce73638a950f705228d8533b83 (patch)
treead717976da77df489a5920c6ad2fb1fe8a6ad707 /distrib
parent569ea89bfcfb68744f7617267e5b16d22e6404f1 (diff)
Count existing vlan's so restarting the script doesn't lose track of
which vlan to create next.
Diffstat (limited to 'distrib')
-rw-r--r--distrib/miniroot/install.sub7
1 files changed, 6 insertions, 1 deletions
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