iscsi-scst/Makefile: Improve MOFED support for Debian systems

Instead of only checking the mlnx-ofed-kernel-dkms package name, also check
the mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: extracted this change from a larger patch ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8667 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-11-23 19:54:54 +00:00
parent 8bdb6a625a
commit 810231050f

View File

@@ -57,12 +57,12 @@ OFED_CFLAGS:=
OFED_FLAVOR=$(shell if [ -e /usr/bin/ofed_info ]; then /usr/bin/ofed_info 2>/dev/null | head -n1 | sed -n 's/^\(MLNX_OFED\|OFED-internal\).*/MOFED/p;s/^OFED-.*/OFED/p'; else echo in-tree; fi)
ifeq ($(OFED_FLAVOR),MOFED)
ifeq ($(shell if dpkg -s mlnx-ofed-kernel-dkms >/dev/null 2>&1; then \
ifeq ($(shell if { dpkg -s mlnx-ofed-kernel-dkms || dpkg -s mlnx-ofed-kernel-modules; } >/dev/null 2>&1; then \
echo true; \
else \
echo false; \
fi),true)
OFED_VERS=$(shell dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms)
OFED_VERS=$(shell dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms mlnx-ofed-kernel-modules 2>/dev/null | head -n 1)
else
ifeq ($(shell if { rpm -q mlnx-ofa_kernel-devel || \
rpm -q kernel-ib-devel; } >&/dev/null; then \