summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-16 00:53:02 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-16 00:53:02 +0200
commit8eb5a6e001afd3da22fe4c16fe786a362d46733e (patch)
treecbb0f69ee4150fbe46298d3245cd05f9f4c27fcb /src
parent2db7648aa8bc9a31342d82a3fa0e63664cae5431 (diff)
mount: tell /bin/mount to never touch /etc/mtab
/etc/mtab should die die die. It's sad enough util-linux still contains support for it, but we don't have to partake in that charade, so let's turn this off. This is in-line with the fact that since years we already have been "tainting" systemd if we detect /etc/mtab not being a symlink... Of course, util-linux is currently broken, and still touches /etc/mtab, weven if we pass "--no-mtab" to it: https://bugzilla.redhat.com/show_bug.cgi?id=1109367 But hey, let's hope that gets fixed quickly, even if total removal of /etc/mtab support from util-linux might not happen so quickly...
Diffstat (limited to 'src')
-rw-r--r--src/core/mount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 14ac0a060e..ca21ec7d0e 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -892,6 +892,7 @@ static void mount_enter_unmounting(Mount *m) {
if ((r = exec_command_set(
m->control_command,
"/bin/umount",
+ "-n",
m->where,
NULL)) < 0)
goto fail;
@@ -934,6 +935,7 @@ static void mount_enter_mounting(Mount *m) {
r = exec_command_set(
m->control_command,
"/bin/mount",
+ "-n",
m->parameters_fragment.what,
m->where,
"-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",
@@ -981,6 +983,7 @@ static void mount_enter_remounting(Mount *m) {
r = exec_command_set(
m->control_command,
"/bin/mount",
+ "-n",
m->parameters_fragment.what,
m->where,
"-t", m->parameters_fragment.fstype ? m->parameters_fragment.fstype : "auto",