From bcce71873bbc908fbd11f2053edffe9151940eaa Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 9 Sep 2015 14:00:23 +0200 Subject: core: freeze execution if /etc/mtab exists 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/main.c b/src/core/main.c index 9aaf244e71..be7d41907a 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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) { -- cgit v1.2.3-54-g00ecf