edex service mananger check for wlan and eth interfaces

Former-commit-id: 5b244101de [formerly 1be6f1d726] [formerly 06c82e1e94] [formerly fa25ccb2fb95653fb935cb980fd84121f09d4d16 [formerly 76a1fcee39e61bc557e7b8a348b5e376ec9b4cec] [formerly 06c82e1e94 [formerly cc7e4035e7]]]
Former-commit-id: ab9e2f4ff10975bf835ef16d6e5a2bda0edb6b71 [formerly 8fe332d7b5060b1a85aa6b51aed24ccb933a7bed] [formerly 16e3a6b7e8 [formerly 74d3d0d8b1]]
Former-commit-id: 16e3a6b7e8
Former-commit-id: d1b52a2e6d
This commit is contained in:
AWIPS User 2015-03-12 15:00:13 -06:00
parent c936619526
commit 8b7d334940

View file

@ -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