#include "selinux-setup.h"
#include "ima-setup.h"
#include "smack-setup.h"
-#ifdef HAVE_KMOD
#include "kmod-setup.h"
-#endif
static enum {
ACTION_RUN,
/* Mount /proc, /sys and friends, so that /proc/cmdline and
* /proc/$PID/fd is available. */
if (getpid() == 1) {
+
+ /* Load the kernel modules early, so that we kdbus.ko is loaded before kdbusfs shall be mounted */
+ if (!skip_setup)
+ kmod_setup();
+
r = mount_setup(loaded_policy);
if (r < 0)
goto finish;
if (arg_show_status > 0 || plymouth_running())
status_welcome();
-#ifdef HAVE_KMOD
- kmod_setup();
-#endif
- mount_setup_late();
hostname_setup();
machine_id_setup(NULL);
loopback_setup();
finish:
pager_close();
- if (m) {
- manager_free(m);
- m = NULL;
- }
+ m = manager_free(m);
for (j = 0; j < ELEMENTSOF(arg_default_rlimit); j++) {
free(arg_default_rlimit[j]);