[PATCH] Dont try to update mtab with -n and /etc/mtab isnt writable.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 mount/umount.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mount/umount.c b/mount/umount.c
index cadcb06..31076f5 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -349,7 +349,7 @@ umount_one (const char *spec, const char *node, const char *type,
 			remnt.mnt_type = remnt.mnt_fsname = NULL;
 			remnt.mnt_dir = xstrdup(node);
 			remnt.mnt_opts = xstrdup("ro");
-			if (!nomtab)
+			if (!nomtab && mtab_is_writable())
 				update_mtab(node, &remnt);
 			return 0;
 		} else if (errno != EBUSY) { 	/* hmm ... */
-- 
1.5.1

-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux