From: Geoffroy Van Cutsem Date: Wed, 4 Aug 2021 14:06:55 +0000 (+0200) Subject: Fix conditional test in 02_configure.sh script X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;ds=sidebyside;h=b051d247f30684dcc043966ad05e2a15a3788883;p=icn.git 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 --- 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