-* print error if /etc/mtab is not a symlink to /proc/self/mounts
-
* oneshot services which do not remain: 'exited' instead of 'dead'?
it should be visible in 'systemctl' that they have been run
return t;
}
+static void test_mtab(void) {
+ char *p;
+
+ if (readlink_malloc("/etc/mtab", &p) >= 0) {
+ bool b;
+
+ b = streq(p, "/proc/self/mounts");
+ free(p);
+
+ if (b)
+ return;
+ }
+
+ 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.");
+}
+
int main(int argc, char *argv[]) {
Manager *m = NULL;
int r, retval = EXIT_FAILURE;
loopback_setup();
mkdir_p("/dev/.systemd/ask-password/", 0755);
+
+ test_mtab();
}
if ((r = manager_new(arg_running_as, &m)) < 0) {