diff options
Diffstat (limited to 'scripts/runqemu-gen-tapdevs')
-rwxr-xr-x | scripts/runqemu-gen-tapdevs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs index f5be30ac32..d3b27be291 100755 --- a/scripts/runqemu-gen-tapdevs +++ b/scripts/runqemu-gen-tapdevs | |||
@@ -59,10 +59,10 @@ if [ ! -x "$RUNQEMU_IFUP" ]; then | |||
59 | exit 1 | 59 | exit 1 |
60 | fi | 60 | fi |
61 | 61 | ||
62 | IFCONFIG=`which ifconfig 2> /dev/null` | 62 | IFCONFIG=`which ip 2> /dev/null` |
63 | if [ -z "$IFCONFIG" ]; then | 63 | if [ -z "$IFCONFIG" ]; then |
64 | # Is it ever anywhere else? | 64 | # Is it ever anywhere else? |
65 | IFCONFIG=/sbin/ifconfig | 65 | IFCONFIG=/sbin/ip |
66 | fi | 66 | fi |
67 | if [ ! -x "$IFCONFIG" ]; then | 67 | if [ ! -x "$IFCONFIG" ]; then |
68 | echo "$IFCONFIG cannot be executed" | 68 | echo "$IFCONFIG cannot be executed" |
@@ -70,7 +70,7 @@ if [ ! -x "$IFCONFIG" ]; then | |||
70 | fi | 70 | fi |
71 | 71 | ||
72 | # Ensure we start with a clean slate | 72 | # Ensure we start with a clean slate |
73 | for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }' | sed s/://`; do | 73 | for tap in `$IFCONFIG link | grep tap | awk '{ print \$2 }' | sed s/://`; do |
74 | echo "Note: Destroying pre-existing tap interface $tap..." | 74 | echo "Note: Destroying pre-existing tap interface $tap..." |
75 | $TUNCTL -d $tap | 75 | $TUNCTL -d $tap |
76 | done | 76 | done |