From e7ccfcf213af2778460e22a5e61a3392c974b271 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 25 Sep 2017 23:35:49 +0000 Subject: [PATCH] iscsi-scst/Makefile, Ubuntu: Simplify code for version querying git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7235 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 9dd7f919b..31007ca6a 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -70,8 +70,7 @@ ifeq ($(OFED_FLAVOR),MOFED) else \ echo false; \ fi),true) - OFED_VERS=$(shell dpkg -s mlnx-ofed-kernel-dkms | \ - awk -F\- '/Version/ {print $$1}' | awk '{print $$2}') + OFED_VERS=$(shell dpkg-query -W --showformat='${Version}\n' mlnx-ofed-kernel-dkms) else ifeq ($(shell if { rpm -q mlnx-ofa_kernel-devel || \ rpm -q kernel-ib-devel; } >&/dev/null; then \