summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-ifup
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu-ifup')
-rwxr-xr-xscripts/runqemu-ifup2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
index e3aa16c97d..5dc765dee8 100755
--- a/scripts/runqemu-ifup
+++ b/scripts/runqemu-ifup
@@ -38,7 +38,7 @@ USERID="-u $1"
38GROUP="-g $2" 38GROUP="-g $2"
39 39
40if taps=$(ip tuntap list 2>/dev/null); then 40if taps=$(ip tuntap list 2>/dev/null); then
41 tap_no=$(( $(echo "$taps" |sort -r |sed 's/^tap//; s/:.*//; q') + 1 )) 41 tap_no=$(( $(echo "$taps" |cut -f 1 -d ":" | sed 's/tap//g' | sort -rn | head -n 1) + 1 ))
42 ip tuntap add tap$tap_no mode tap group $2 && TAP=tap$tap_no 42 ip tuntap add tap$tap_no mode tap group $2 && TAP=tap$tap_no
43fi 43fi
44 44