-
- static const char kmod_table[] =
- /* This one we need to load explicitly, since
- * auto-loading on use doesn't work before udev
- * created the ghost device nodes, and we need it
- * earlier than that. */
- "autofs4\0" "/sys/class/misc/autofs\0"
-
- /* This one we need to load explicitly, since
- * auto-loading of IPv6 is not done when we try to
- * configure ::1 on the loopback device. */
- "ipv6\0" "/sys/module/ipv6\0"
-
- "unix\0" "/proc/net/unix\0";
-
+#ifdef HAVE_KMOD
+
+ static const struct {
+ const char *module;
+ const char *path;
+ bool warn;
+ bool (*condition_fn)(void);
+ } kmod_table[] = {
+ /* auto-loading on use doesn't work before udev is up */
+ { "autofs4", "/sys/class/misc/autofs", true, NULL },
+
+ /* early configure of ::1 on the loopback device */
+ { "ipv6", "/sys/module/ipv6", true, NULL },
+
+ /* this should never be a module */
+ { "unix", "/proc/net/unix", true, NULL },
+
+ /* IPC is needed before we bring up any other services */
+ { "kdbus", "/sys/fs/kdbus", false, cmdline_check_kdbus },
+ };