Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
ci/install_runtime: Refactor the vsock module checking
Browse files Browse the repository at this point in the history
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 <wainersm@redhat.com>
  • Loading branch information
wainersm committed Dec 18, 2020
1 parent d99b58d commit 059a69c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .ci/install_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 059a69c

Please # to comment.