]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: drop check for /etc/mtab 1754/head
authorMartin Pitt <martin.pitt@ubuntu.com>
Mon, 2 Nov 2015 16:05:20 +0000 (10:05 -0600)
committerMartin Pitt <martin.pitt@ubuntu.com>
Mon, 2 Nov 2015 16:05:20 +0000 (10:05 -0600)
util-linux 2.27.1 now entirely stops looking at /etc/mtab, so we don't need to
verify /etc/mtab during early boot any more. Later on, tmpfiles.d/etc.conf will
fix /etc/mtab anyway, so there's not even a point in warning about it.

Drop test_mtab() and bump the util-linux dependency to >= 2.17.1.

Fixes #1495

README
configure.ac
src/core/main.c

diff --git a/README b/README
index f6fb966b26d4d54841857f9c3688dbea61dc8a94..bc7068a66da294cd150d5e02cdcc971a6a9284ea 100644 (file)
--- a/README
+++ b/README
@@ -122,7 +122,7 @@ REQUIREMENTS:
 
         glibc >= 2.16
         libcap
-        libmount >= 2.27 (from util-linux)
+        libmount >= 2.27.1 (from util-linux)
         libseccomp >= 1.0.0 (optional)
         libblkid >= 2.24 (from util-linux) (optional)
         libkmod >= 15 (optional)
@@ -144,7 +144,7 @@ REQUIREMENTS:
         During runtime, you need the following additional
         dependencies:
 
-        util-linux >= v2.27 required
+        util-linux >= v2.27.1 required
         dbus >= 1.4.0 (strictly speaking optional, but recommended)
         dracut (optional)
         PolicyKit (optional)
index c96b9fb1d9fe47b3a6926a282036b35d6b408de2..88cb76667f3904e27f1ac198df4c1943a6721f8f 100644 (file)
@@ -437,7 +437,7 @@ AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
 
 # ------------------------------------------------------------------------------
 have_libmount=no
-PKG_CHECK_MODULES(MOUNT, [ mount >= 2.27 ],
+PKG_CHECK_MODULES(MOUNT, [ mount >= 2.27.1 ],
         [AC_DEFINE(HAVE_LIBMOUNT, 1, [Define if libmount is available]) have_libmount=yes], have_libmount=no)
 if test "x$have_libmount" = xno; then
         AC_MSG_ERROR([*** libmount support required but libraries not found])
index 593b974566dd2ab37eb2cd3a45587a30fc8f8ab9..59078c968b8a10ed64584e3d33383d3658f62a8f 100644 (file)
@@ -1113,33 +1113,6 @@ static int bump_rlimit_nofile(struct rlimit *saved_rlimit) {
         return 0;
 }
 
-static void test_mtab(void) {
-
-        static const char ok[] =
-                "/proc/self/mounts\0"
-                "/proc/mounts\0"
-                "../proc/self/mounts\0"
-                "../proc/mounts\0";
-
-        _cleanup_free_ char *p = NULL;
-        int r;
-
-        /* Check that /etc/mtab is a symlink to the right place or
-         * non-existing. But certainly not a file, or a symlink to
-         * some weird place... */
-
-        r = readlink_malloc("/etc/mtab", &p);
-        if (r == -ENOENT)
-                return;
-        if (r >= 0 && nulstr_contains(ok, p))
-                return;
-
-        log_error("/etc/mtab is not a symlink or not pointing to /proc/self/mounts. "
-                  "This is not supported anymore. "
-                  "Please replace /etc/mtab with a symlink to /proc/self/mounts.");
-        freeze_or_reboot();
-}
-
 static void test_usr(void) {
 
         /* Check that /usr is not a separate fs */
@@ -1614,7 +1587,6 @@ int main(int argc, char *argv[]) {
                 machine_id_setup(NULL);
                 loopback_setup();
 
-                test_mtab();
                 test_usr();
         }