]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
kmod-setup: conditionalize kmod autoloading properly
authorLennart Poettering <lennart@poettering.net>
Mon, 18 May 2015 15:27:37 +0000 (17:27 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 May 2015 15:27:42 +0000 (17:27 +0200)
Load kdbus.ko only if we are built with kdbus, and load ip_tables.ko
only if we are built with iptables support.

src/core/kmod-setup.c

index 132c3e866c009a3f7d8d75b0ea81ad67249f7455..6cc59517195ab78aa4a8dc8a535fe776d2024e92 100644 (file)
@@ -65,11 +65,15 @@ int kmod_setup(void) {
                 /* this should never be a module */
                 { "unix",      "/proc/net/unix",            true,  NULL                },
 
+#ifdef ENABLE_KDBUS
                 /* IPC is needed before we bring up any other services */
                 { "kdbus",     "/sys/fs/kdbus",             false, is_kdbus_wanted     },
+#endif
 
+#ifdef HAVE_LIBIPTC
                 /* netfilter is needed by networkd, nspawn among others, and cannot be autoloaded */
                 { "ip_tables", "/proc/net/ip_tables_names", false, NULL                },
+#endif
         };
         struct kmod_ctx *ctx = NULL;
         unsigned int i;