diff options
Diffstat (limited to 'scripts/runqemu-ifup')
-rwxr-xr-x | scripts/runqemu-ifup | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup index 0926faf439..8948153d5a 100755 --- a/scripts/runqemu-ifup +++ b/scripts/runqemu-ifup | |||
@@ -70,10 +70,10 @@ if [ $STATUS -ne 0 ]; then | |||
70 | fi | 70 | fi |
71 | fi | 71 | fi |
72 | 72 | ||
73 | IFCONFIG=`which ifconfig 2> /dev/null` | 73 | IFCONFIG=`which ip 2> /dev/null` |
74 | if [ "x$IFCONFIG" = "x" ]; then | 74 | if [ "x$IFCONFIG" = "x" ]; then |
75 | # better than nothing... | 75 | # better than nothing... |
76 | IFCONFIG=/sbin/ifconfig | 76 | IFCONFIG=/sbin/ip |
77 | fi | 77 | fi |
78 | if [ ! -x "$IFCONFIG" ]; then | 78 | if [ ! -x "$IFCONFIG" ]; then |
79 | echo "$IFCONFIG cannot be executed" | 79 | echo "$IFCONFIG cannot be executed" |
@@ -100,7 +100,7 @@ if [ ! -x "$IPTABLES" ]; then | |||
100 | fi | 100 | fi |
101 | 101 | ||
102 | n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] | 102 | n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] |
103 | $IFCONFIG $TAP 192.168.7.$n netmask 255.255.255.255 | 103 | $IFCONFIG addr add 192.168.7.$n/32 dev $TAP |
104 | 104 | ||
105 | dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] | 105 | dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] |
106 | $ROUTE add -host 192.168.7.$dest $TAP | 106 | $ROUTE add -host 192.168.7.$dest $TAP |