diff options
author | 2009-06-10 01:28:10 +0000 | |
---|---|---|
committer | 2009-06-10 01:28:10 +0000 | |
commit | f7e8401c0ddbe2ddff0ff1c20eb98fc1e03482a8 (patch) | |
tree | 010c1938776f80839aadff90a89c6fa9efb0170d | |
parent | when sets cannot be found, do the 4-space indent dance to make the (diff) | |
download | wireguard-openbsd-f7e8401c0ddbe2ddff0ff1c20eb98fc1e03482a8.tar.xz wireguard-openbsd-f7e8401c0ddbe2ddff0ff1c20eb98fc1e03482a8.zip |
Count existing vlan's so restarting the script doesn't lose track of
which vlan to create next.
-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 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 |