[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] hotplug/Linux: update to new ip command syntax.



Signed-off-by: Ian Campbell <ijc@xxxxxxxxxxxxxx>
Signed-off-by: Mike <debian@xxxxxxxxxxxxxxxxxxxxx>
---
 tools/hotplug/Linux/vif-bridge            |  6 +++---
 tools/hotplug/Linux/vif-nat               |  2 +-
 tools/hotplug/Linux/xen-network-common.sh | 10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
index f489519..55f8b99 100644
--- a/tools/hotplug/Linux/vif-bridge
+++ b/tools/hotplug/Linux/vif-bridge
@@ -73,7 +73,7 @@ else
 fi
 
 RET=0
-ip link show $bridge 1>/dev/null 2>&1 || RET=1
+ip link show dev $bridge 1>/dev/null 2>&1 || RET=1
 if [ "$RET" -eq 1 ]
 then
     fatal "Could not find bridge device $bridge"
@@ -82,10 +82,10 @@ fi
 case "$command" in
     online)
         setup_virtual_bridge_port "$dev"
-        mtu="`ip link show $bridge | awk '/mtu/ { print $5 }'`"
+        mtu="`ip link show dev $bridge | awk '/mtu/ { print $5 }'`"
         if [ -n "$mtu" ] && [ "$mtu" -gt 0 ]
         then
-                ip link set $dev mtu $mtu || :
+                ip link set dev $dev mtu $mtu || :
         fi
         add_to_bridge "$bridge" "$dev"
         ;;
diff --git a/tools/hotplug/Linux/vif-nat b/tools/hotplug/Linux/vif-nat
index 8d29fb6..0b900d5 100644
--- a/tools/hotplug/Linux/vif-nat
+++ b/tools/hotplug/Linux/vif-nat
@@ -170,7 +170,7 @@ case "$command" in
           exit 0
         fi
 
-        do_or_die ip link set "${dev}" up arp on
+        do_or_die ip link set dev "${dev}" up arp on
         do_or_die ip addr add "$router_ip" dev "${dev}"
         do_or_die ip route add "$vif_ip" dev "${dev}" src "$router_ip"
         echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp
diff --git a/tools/hotplug/Linux/xen-network-common.sh 
b/tools/hotplug/Linux/xen-network-common.sh
index 8cff156..db030d8 100644
--- a/tools/hotplug/Linux/xen-network-common.sh
+++ b/tools/hotplug/Linux/xen-network-common.sh
@@ -85,18 +85,18 @@ _setup_bridge_port() {
     local virtual="$2"
 
     # take interface down ...
-    ip link set ${dev} down
+    ip link set dev ${dev} down
 
     if [ $virtual -ne 0 ] ; then
         # Initialise a dummy MAC address. We choose the numerically
         # largest non-broadcast address to prevent the address getting
         # stolen by an Ethernet bridge for STP purposes.
         # (FE:FF:FF:FF:FF:FF)
-        ip link set ${dev} address fe:ff:ff:ff:ff:ff || true
+        ip link set dev ${dev} address fe:ff:ff:ff:ff:ff || true
     fi
 
     # ... and configure it
-    ip addr flush ${dev}
+    ip address flush dev ${dev}
 }
 
 setup_physical_bridge_port() {
@@ -125,10 +125,10 @@ add_to_bridge () {
 
     # Don't add $dev to $bridge if it's already on a bridge.
     if [ -e "/sys/class/net/${bridge}/brif/${dev}" ]; then
-       ip link set ${dev} up || true
+       ip link set dev ${dev} up || true
        return
     fi
     brctl addif ${bridge} ${dev}
-    ip link set ${dev} up
+    ip link set dev ${dev} up
 }
 
-- 
1.8.3.2

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.