From 922cd3fe3afeef62423e67ffd95ace1cb0291fd8 Mon Sep 17 00:00:00 2001 From: davidplunkett Date: Tue, 4 Jun 2019 20:07:42 +0000 Subject: [PATCH] use ip addr for build ip check Signed-off-by: davidplunkett Change-Id: I7d3027ae054c2de609cb88004f5196f20a43ee6c --- install_server_os.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install_server_os.sh b/install_server_os.sh index 1e93464..39b9fec 100755 --- a/install_server_os.sh +++ b/install_server_os.sh @@ -155,13 +155,13 @@ if [ $? -ne 0 ] || [ -z "$VERSION" ]; then fi ## CHECK IF BUILD_WEBIP IS ON THIS SERVER -if ! ifconfig | grep -B1 ":$BUILD_WEBIP " >/dev/null; then +if ! ip addr | grep -B2 "inet $BUILD_WEBIP" >/dev/null; then echo "ERROR: Build Web ip address [$BUILD_WEBIP] not found on this server" - ifconfig | grep --no-group-separator -B1 "inet addr:" + ip addr | grep --no-group-separator -B2 "inet " exit 1 else echo "Found build web ip address [$BUILD_WEBIP] on this server!" - ifconfig | grep --no-group-separator -B1 ":$BUILD_WEBIP " + ip addr | grep --no-group-separator -B2 "inet $BUILD_WEBIP" fi ## CHECK THAT SERVER OOB INTERFACE IS REACHABLE -- 2.16.6