From b051d247f30684dcc043966ad05e2a15a3788883 Mon Sep 17 00:00:00 2001 From: Geoffroy Van Cutsem Date: Wed, 4 Aug 2021 16:06:55 +0200 Subject: [PATCH] Fix conditional test in 02_configure.sh script Fix a conditional statement that returns an error although the command ran successfully. Fortunately, this did not affect the functionality and logic in the script but it generated extra noise on the console logs that are unnecessary and potentially confusing to users. Signed-off-by: Geoffroy Van Cutsem Change-Id: Ic59c09e2b2890af37bbb023d0b372baa2f718c2d --- env/metal3/02_configure.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/env/metal3/02_configure.sh b/env/metal3/02_configure.sh index 085a162..d2842d2 100755 --- a/env/metal3/02_configure.sh +++ b/env/metal3/02_configure.sh @@ -15,7 +15,8 @@ function check_interface_ip { local interface=$1 local ipaddr=$2 - if [ ! $(ip addr show dev $interface) ]; then + ip addr show dev $interface + if [ $? -ne 0 ]; then exit 1 fi -- 2.16.6