From: Daniel Mack Date: Wed, 9 Sep 2015 12:00:23 +0000 (+0200) Subject: core: freeze execution if /etc/mtab exists X-Git-Tag: v227~162^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bcce71873bbc908fbd11f2053edffe9151940eaa;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/main.c b/src/core/main.c index 9aaf244e715..be7d41907a8 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) {