ipset make modules_install always fail unless module already loaded?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

In Makefile.am there is this block:

modules_install:
if WITH_KMOD
    ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net \
            KDIR=$$PWD/kernel modules_install
    @modinfo -b ${INSTALL_MOD_PATH} ip_set_hash_ip | ${GREP} /extra/
>/dev/null || echo "$$DEPMOD_WARNING"
    @lsmod | ${GREP} '^ip_set' >/dev/null && echo "$$MODULE_WARNING"
else
    @echo Skipping kernel modules due to --with-kmod=no
endif

I'm rusty on shell script, but it seems to me that the line with lsmod
will print the warning
and return exit code 0 if a matching module is loaded but if such a
module is NOT loaded,
grep will give exit code 1 (intended) and it will not print the
warning (intended) but then the
whole line will return exit code 1 cause make to stop with an error.
If being run from another
script it can/will stop that script from continuing.

In short - make modules_install will only run successfully if an ipset
module is already loaded. At least I seem to get this problem.

/Oskar



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux