]> granicus.if.org Git - zfs/commitdiff
Prevent rm modules.* when make install
authortuxoko <tuxoko@gmail.com>
Fri, 20 Nov 2015 01:42:41 +0000 (17:42 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 2 Dec 2015 22:39:12 +0000 (14:39 -0800)
This was originally in fe0ed8f910c1e4288dc190546cfe98ecf545b547, but somehow
was changed and not working anymore. And it will cause the following error:

modprobe: ERROR: ../libkmod/libkmod.c:506 lookup_builtin_file() could not open builtin file '/lib/modules/4.2.0-18-generic/modules.builtin.bin'

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4027

module/Makefile.in

index e8d34c894b3d9ece2d1e8f5319e0903b79c6fb8f..d4ddee2f429f9b5eca4770457fab606bf590cf56 100644 (file)
@@ -47,7 +47,7 @@ modules_install:
                KERNELRELEASE=@LINUX_VERSION@
        @# Remove extraneous build products when packaging
        kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
-       if [ -n $$kmoddir ]; then \
+       if [ -n "$(DESTDIR)" ]; then \
                find $$kmoddir -name 'modules.*' | xargs $(RM); \
        fi
        sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \