summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-openembedded/meta-networking/recipes-support/drbd/drbd/check_existence_of_modules_before_installing.patch
blob: 6414f7305a762347869fc132f4c5a895611145b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD
does not build drbd.ko here. Under this circumstance do_install
task is going to fail with a below error:
-- snip --
| install: cannot stat ‘drbd.ko’: No such file or directory
| make[1]: *** [install] Error 1
-- snip --

So, check for kernel module existence before installing.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
--- drbd-9.0.1-1/drbd/Makefile	2016-07-03 06:54:19.421538690 -0700
+++ drbd-9.0.1-1/drbd/Makefile_mod	2016-07-03 06:53:18.938801628 -0700
@@ -158,7 +158,7 @@ else
 	fi
 	install -d $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
 	set -e ; for ko in $(MODOBJS); do \
-		install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
+		[ -e $$ko ] && install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
 	done
     ifeq ($(DESTDIR),/)
       ifeq ($(shell uname -r),$(KERNELRELEASE))
OpenPOWER on IntegriCloud