VPC : fix nic hot plug script

Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/10a578db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/10a578db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/10a578db

Branch: refs/heads/vpc
Commit: 10a578db460f6699edcc2642f9af3cee8c1ce3c4
Parents: d51e344
Author: anthony <[email protected]>
Authored: Tue Jun 12 12:26:31 2012 -0700
Committer: Alena Prokharchyk <[email protected]>
Committed: Fri Jun 15 14:32:31 2012 -0700

----------------------------------------------------------------------
 .../debian/config/opt/cloud/bin/cloud-nic.sh       |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/10a578db/patches/systemvm/debian/config/opt/cloud/bin/cloud-nic.sh
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/opt/cloud/bin/cloud-nic.sh 
b/patches/systemvm/debian/config/opt/cloud/bin/cloud-nic.sh
index 1f1e52e..3f80a4c 100755
--- a/patches/systemvm/debian/config/opt/cloud/bin/cloud-nic.sh
+++ b/patches/systemvm/debian/config/opt/cloud/bin/cloud-nic.sh
@@ -16,9 +16,9 @@ unplug_nic() {
   sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j MARK 
--set-mark $tableNo 2>/dev/null
   sudo iptables -t mangle -D PREROUTING -i $dev -m state --state NEW -j 
CONNMARK --save-mark 2>/dev/null
 
-  sudo sed -i '/"$tableNo $tableName"/d' /etc/iproute2/rt_tables 2>/dev/null
-  sudo ip rule delete fwmark $tableNo table $tableName 2>/dev/null
-  sudo ip route flush  table $tableName
+  sudo ip rule del fwmark $tableNo 2>/dev/null
+  sudo ip route flush table $tableName
+  sudo sed -i /"$tableNo $tableName"/d /etc/iproute2/rt_tables 2>/dev/null
   sudo ip route flush cache
 }
 

Reply via email to