From 059a69c6050f80f10ad2c66d12c0d328d948cf15 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Wed, 18 Nov 2020 12:32:33 -0500 Subject: [PATCH] ci/install_runtime: Refactor the vsock module checking On the check for the vhost_vsock module, use the bounded '\<\>' grep to make it more reliable. Also it does not need to redirect stderr/stdout to /dev/null, so removed it. Signed-off-by: Wainer dos Santos Moschetta --- .ci/install_runtime.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/install_runtime.sh b/.ci/install_runtime.sh index e719f5ead..aa3469b6e 100755 --- a/.ci/install_runtime.sh +++ b/.ci/install_runtime.sh @@ -135,7 +135,7 @@ if [ "$USE_VSOCK" == "yes" ]; then if [ "$OPENSHIFT_CI" == "false" ]; then vsock_module="vhost_vsock" echo "Check if ${vsock_module} is loaded" - if lsmod | grep -q "$vsock_module" &> /dev/null ; then + if lsmod | grep -q "\<${vsock_module}\>" ; then echo "Module ${vsock_module} is already loaded" else echo "Load ${vsock_module} module"