X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=b9330b314bad3eef9b5bfdaf163fb4d738168f8e;hb=3c3ea19446f994a4b1e97b3ef10a1062a2e3ad21;hp=f19b2992a6bf406e77040eca7a38d902d5ad3c43;hpb=e63d60268c9ae3f07851d48eb3f8c9cd96ce23ad;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index f19b2992..b9330b31 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -137,7 +137,7 @@ function remove_iptables() { if [ -z "$DEFAULT_IP" ]; then DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}') - [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}') + [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}') [ -z "$DEFAULT_IF" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0" DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF}|awk '{split($4,a,"/"); print a[1]}'` [ -z "$DEFAULT_IP" ] && FATAL "Not possible to determine the IP address of the interface with the default route" @@ -1199,7 +1199,7 @@ function install_lightweight() { DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}') [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}') [ -z "$DEFAULT_IF" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0" - DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF} |awk '{split($4,a,"/"); print a[1]}'` + DEFAULT_IP=`ip -o -4 a s ${DEFAULT_IF} |awk '{split($4,a,"/"); print a[1]}'` [ -z "$DEFAULT_IP" ] && FATAL "Not possible to determine the IP address of the interface with the default route" DEFAULT_MTU=$(ip addr show ${DEFAULT_IF} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}')