blob: 6414f7305a762347869fc132f4c5a895611145b3 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD
2does not build drbd.ko here. Under this circumstance do_install
3task is going to fail with a below error:
4-- snip --
5| install: cannot stat drbd.ko’: No such file or directory
6| make[1]: *** [install] Error 1
7-- snip --
8
9So, check for kernel module existence before installing.
10
11Upstream-Status: Inappropriate [embedded specific]
12
13Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
14--- drbd-9.0.1-1/drbd/Makefile 2016-07-03 06:54:19.421538690 -0700
15+++ drbd-9.0.1-1/drbd/Makefile_mod 2016-07-03 06:53:18.938801628 -0700
16@@ -158,7 +158,7 @@ else
17 fi
18 install -d $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
19 set -e ; for ko in $(MODOBJS); do \
20- install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
21+ [ -e $$ko ] && install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
22 done
23 ifeq ($(DESTDIR),/)
24 ifeq ($(shell uname -r),$(KERNELRELEASE))