* ipset make modules_install always fail unless module already loaded?
@ 2019-10-29 20:40 Oskar Berggren
2019-10-31 11:12 ` Kadlecsik József
0 siblings, 1 reply; 2+ messages in thread
From: Oskar Berggren @ 2019-10-29 20:40 UTC (permalink / raw)
To: netfilter-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ipset make modules_install always fail unless module already loaded?
2019-10-29 20:40 ipset make modules_install always fail unless module already loaded? Oskar Berggren
@ 2019-10-31 11:12 ` Kadlecsik József
0 siblings, 0 replies; 2+ messages in thread
From: Kadlecsik József @ 2019-10-31 11:12 UTC (permalink / raw)
To: Oskar Berggren; +Cc: netfilter-devel
Hi Oskar,
On Tue, 29 Oct 2019, Oskar Berggren wrote:
> 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.
Yes, that was not taken care of. I'm committing the patch
diff --git a/Makefile.am b/Makefile.am
index 8d718e1..eab32ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,7 +73,7 @@ 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"
+ @lsmod | ${GREP} '^ip_set' >/dev/null && echo "$$MODULE_WARNING"; true
else
@echo Skipping kernel modules due to --with-kmod=no
endif
to fix the issue.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : Wigner Research Centre for Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-31 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 20:40 ipset make modules_install always fail unless module already loaded? Oskar Berggren
2019-10-31 11:12 ` Kadlecsik József
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.