target = mnt_fs_get_target(cxt->fs);
- if (cxt->action == MNT_ACT_UMOUNT && target && !strcmp(target, "/"))
- /* Don't try to touch mtab if umounting root FS */
+ if (cxt->action == MNT_ACT_UMOUNT && target && !strcmp(target, "/")) {
+ DBG(CXT, ul_debugobj(cxt, "root umount: setting NOMTAB"));
mnt_context_disable_mtab(cxt, TRUE);
-
+ }
if (mnt_context_is_nomtab(cxt)) {
DBG(CXT, ul_debugobj(cxt, "skip update: NOMTAB flag"));
return 0;
assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED));
assert(cxt->helper_exec_status == 1);
+ if (mnt_context_is_fake(cxt)) {
+ DBG(CXT, ul_debugobj(cxt, "fake mode: does not execute helper"));
+ cxt->helper_exec_status = rc = 0;
+ return rc;
+ }
+
DBG_FLUSH;
switch (fork()) {
device.
.TP
.B \-\-fake
-Causes everything to be done except for the actual system call; this 'fakes'
-unmounting the filesystem. It can be used to remove entries from
+Causes everything to be done except for the actual system call or umount helper
+execution; this 'fakes' unmounting the filesystem. It can be used to remove
+entries from
.I /etc/mtab
that were unmounted earlier with the
.B \-n