diff options
author | Karel Zak | 2015-02-16 12:49:49 +0100 |
---|---|---|
committer | Karel Zak | 2015-02-16 12:49:49 +0100 |
commit | e3f72275ca2fa65b51f8183af925a5541eed8a7a (patch) | |
tree | dbfe8f5897acd554fe8560183f535b36aa21276a /configure.ac | |
parent | hwclock: man-page errata (diff) | |
download | kernel-qcow2-util-linux-e3f72275ca2fa65b51f8183af925a5541eed8a7a.tar.gz kernel-qcow2-util-linux-e3f72275ca2fa65b51f8183af925a5541eed8a7a.tar.xz kernel-qcow2-util-linux-e3f72275ca2fa65b51f8183af925a5541eed8a7a.zip |
libmount: add --enable-libmount-force-mountinfo
The default libmount mtab management depends on mtan symlink. If the
symlink exists than libmount parses /proc/self/mountinfo, otherwise it
parses regular classic /etc/mtab. This is backwardly compatible and
transparent solution.
Unfortunately, this is not robust enough because some broken init
scripts or 3-party mount helpers may remove the symlink and create
regular mtab file. This is pretty bad if initd (systemd) depends on
libmount.
Fortunately we known that mtab is absolutely unwanted on some distros,
so it's fine too ignore mtab at all and don't care about the symlink.
Reported-by: Martin Pitt <martin.pitt@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 118dcb777..c846efbda 100644 --- a/configure.ac +++ b/configure.ac @@ -851,6 +851,15 @@ AC_SUBST([LIBMOUNT_PATCH_VERSION], $PACKAGE_VERSION_RELEASE) AC_SUBST([LIBMOUNT_VERSION_INFO]) AC_DEFINE_UNQUOTED([LIBMOUNT_VERSION], ["$LIBMOUNT_VERSION"], [libmount version string]) +AC_ARG_ENABLE([libmount-force-mountinfo], + AS_HELP_STRING([--enable-libmount-force-mountinfo], [ignore /etc/mtab in all situations (recommended for systemd)]), + [], [enable_libmount_force_mountinfo=no] +) + +AS_IF([test "x$enable_libmount_force_mountinfo" == xyes], [ + AC_DEFINE([USE_LIBMOUNT_FORCE_MOUNTINFO], [1], [Define to 1 if want to ignore mtab in all situations.]) +]) + dnl dnl libsmartcols |