Commit 1f325736 authored by Anmol Vatsa's avatar Anmol Vatsa

bit more correction in fetching device name

parent 141617a0
......@@ -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}' | head -n1 | 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 -A1 enp|grep -B1 192|awk '{print $1}'|head -n1`
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