Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD |
| 2 | does not build drbd.ko here. Under this circumstance do_install |
| 3 | task 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 | |
| 9 | So, check for kernel module existence before installing. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [embedded specific] |
| 12 | |
| 13 | Signed-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)) |