]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: freeze execution if /etc/mtab exists 1214/head
authorDaniel Mack <daniel@zonque.org>
Wed, 9 Sep 2015 12:00:23 +0000 (14:00 +0200)
committerDaniel Mack <daniel@zonque.org>
Wed, 9 Sep 2015 12:00:23 +0000 (14:00 +0200)
The mount monitor that was added to libmount v2.27 requires /etc/mtab to be
non-existant. As systemd now uses that functionality, we cannot monitor any
mounts anymore, and hence not support .mount units.

Systems that have /etc/mtab around as regular file are unsupported by
systemd since a long time.

This patch makes that condition fatal, so we do not boot up with
non-working mount monitor support.

src/core/main.c

index 9aaf244e715a43bccf9217f9f737276356854c5f..be7d41907a846c482967c24ea4f837ce58fc0a76 100644 (file)
@@ -1118,9 +1118,10 @@ static void test_mtab(void) {
         if (r >= 0 && nulstr_contains(ok, p))
                 return;
 
-        log_warning("/etc/mtab is not a symlink or not pointing to /proc/self/mounts. "
-                    "This is not supported anymore. "
-                    "Please make sure to replace this file by a symlink to avoid incorrect or misleading mount(8) output.");
+        log_error("/etc/mtab is not a symlink or not pointing to /proc/self/mounts. "
+                  "This is not supported anymore. "
+                  "Please make sure to replace this file by a symlink to avoid incorrect or misleading mount(8) output.");
+        freeze();
 }
 
 static void test_usr(void) {