netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oskar Berggren <oskar.berggren@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: ipset make modules_install always fail unless module already loaded?
Date: Tue, 29 Oct 2019 20:40:01 +0000	[thread overview]
Message-ID: <CAHOuc7MXK7nqU84y7KnoO_4DdJPL2ts33c0tDENyS3bgHhZgeg@mail.gmail.com> (raw)

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

             reply	other threads:[~2019-10-29 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 20:40 Oskar Berggren [this message]
2019-10-31 11:12 ` ipset make modules_install always fail unless module already loaded? Kadlecsik József

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHOuc7MXK7nqU84y7KnoO_4DdJPL2ts33c0tDENyS3bgHhZgeg@mail.gmail.com \
    --to=oskar.berggren@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).