aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2006-03-31 00:09:42 +0100
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2006-03-31 00:09:42 +0100
commit26c829aa89c7686c0fb591429c654837e1606d40 (patch)
tree11126a8b466fc97bd2290c0cf0d19adc6a18ac3a
parenta638cd3e8916998d1506b3bfc875520dcafa4552 (diff)
downloadxen-26c829aa89c7686c0fb591429c654837e1606d40.tar.gz
xen-26c829aa89c7686c0fb591429c654837e1606d40.tar.bz2
xen-26c829aa89c7686c0fb591429c654837e1606d40.zip
Don't use abbreviated ip subcommands -- these are not accepted by iproute2.
Closes bug #478. Signed-off-by: Ewan Mellor <ewan@xensource.com>
-rw-r--r--tools/examples/README.incompatibilities7
-rwxr-xr-xtools/examples/vif-route6
2 files changed, 10 insertions, 3 deletions
diff --git a/tools/examples/README.incompatibilities b/tools/examples/README.incompatibilities
index 87b2dbd62e..bb067bd419 100644
--- a/tools/examples/README.incompatibilities
+++ b/tools/examples/README.incompatibilities
@@ -24,6 +24,13 @@ Gentoo doesn't have ifup/ifdown; appropriate alternatives are defined in
xen-network-common.sh.
+ip
+--
+
+Newer ip commands (from iproute2) do not accept the abbreviated syntax "ip r a
+..." etc. "ip route add ..." must be used instead.
+
+
sed
---
diff --git a/tools/examples/vif-route b/tools/examples/vif-route
index d733119d30..1d5d299b60 100755
--- a/tools/examples/vif-route
+++ b/tools/examples/vif-route
@@ -29,11 +29,11 @@ case "$command" in
online)
ifconfig ${vif} ${main_ip} netmask 255.255.255.255 up
echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
- ipcmd='a'
+ ipcmd='add'
;;
offline)
ifdown ${vif}
- ipcmd='d'
+ ipcmd='del'
;;
esac
@@ -41,7 +41,7 @@ if [ "${ip}" ] ; then
# If we've been given a list of IP addresses, then add routes from dom0 to
# the guest using those addresses.
for addr in ${ip} ; do
- ip r ${ipcmd} ${addr} dev ${vif} src ${main_ip}
+ ip route ${ipcmd} ${addr} dev ${vif} src ${main_ip}
done
fi