It was actually intended to load libmount very early, as it is
needed by more than just mount units, such as umount_recursive(),
bind_remount_recursive(), get_sub_mounts(), etc.
Fixes https://github.com/systemd/systemd/issues/39994
This reverts commit
46b4b33c256b918652d5e0b1b5ec376b598111f6.
#include "killall.h"
#include "kmod-setup.h"
#include "label-util.h"
+#include "libmount-util.h"
#include "limits-util.h"
#include "load-fragment.h"
#include "log.h"
goto finish;
}
+ r = dlopen_libmount();
+ if (r < 0) {
+ error_message = "Failed to load libmount.so";
+ goto finish;
+ }
+
r = initialize_runtime(skip_setup,
first_boot,
&saved_rlimit_nofile,
'dependencies' : [
libapparmor_cflags,
libkmod_cflags,
+ libmount_cflags,
libseccomp_cflags,
libselinux_cflags,
],