Commit 141617a0 authored by Anmol Vatsa's avatar Anmol Vatsa

remove duplicated from add route in ovs script

parent edca515b
......@@ -209,7 +209,7 @@ create() {
if [ -n "$gateway" ];then
subnet=`echo ${sw} | sed -n -r -e 's/[^0-9]*([0-9]*)$/\1/p'`
GATEWAYIP="${IPPREFIX}.$subnet.$gateway_portnum"
sudo route add -net $IPPREFIX.0.0/16 gw `ip route | grep via | grep 192 | awk -F" via " '{print $2}' | awk '{print $1}'` dev `ifconfig | grep enp9 | awk '{print $1}'`
sudo route add -net $IPPREFIX.0.0/16 gw `ip route | grep via | grep 192 | awk -F" via " '{print $2}' | head -n1 | awk '{print $1}'` dev `ifconfig | grep enp9 | awk '{print $1}'`
fi
$OVSCTL add-br $sw
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment