From 74d3d0d8b1f7066feb795823f58a399da372ba01 Mon Sep 17 00:00:00 2001 From: AWIPS User Date: Thu, 12 Mar 2015 15:00:13 -0600 Subject: [PATCH] edex service mananger check for wlan and eth interfaces Former-commit-id: cc7e4035e727f123b8374d6a0626da58ce8e93c9 --- rpms/awips2.upc/Installer.edex-upc/edex | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/rpms/awips2.upc/Installer.edex-upc/edex b/rpms/awips2.upc/Installer.edex-upc/edex index ec2dad6984..746d6274d7 100755 --- a/rpms/awips2.upc/Installer.edex-upc/edex +++ b/rpms/awips2.upc/Installer.edex-upc/edex @@ -57,7 +57,16 @@ nopts=${options[@]} # For multiple IP addresses we need to account for non-routable IPs #IP=`/sbin/ifconfig | grep "inet addr" | grep -v 127.0.0 | awk '{ print $2 }' | cut -d: -f2` -IP=`/sbin/ifconfig eth0 | grep "inet addr" | awk '{ print $2 }' | cut -d: -f2` + +ethdev=`ip link show| grep ^[0-9]| awk '{ print $2}'` + +if [[ $ethdev =~ eth0 ]]; then + usedev=eth0 +elif [[ $ethdev =~ wlan0 ]]; then + usedev=wlan0 +fi + +IP=`/sbin/ifconfig $usedev | grep "inet addr" | awk '{ print $2 }' | cut -d: -f2` if [[ $IP =~ ^10\..* || $IP =~ ^192\.168.* ]] # non-routable IP range then