Don't use abbreviated ip subcommands -- these are not accepted by iproute2.

Closes bug #478.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2006-03-31 00:09:42 +01:00
1 parent a638cd3e89
commit 26c829aa89
2 files changed
+10 -3

No files matched your search

+7
View File
@@ -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
---
+3 -3
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.