From 94b0c44fb7b257800302af06789ce8131766b762 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 23 Feb 2012 15:16:17 +0100 Subject: mount: distinguish between MS_COMMENT flags (netdev, nofail, ...) Since util-linux 2.12h (year 2004) there is only one flag for all dummy options like _netdev or nofail. Unfortunately it means that when mount(8) composes the final mount options string for mtab (or for mount. helpers) the string is generated incorrectly. Reported-by: Dave Reisner Signed-off-by: Karel Zak --- libmount/src/optmap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libmount/src/optmap.c') diff --git a/libmount/src/optmap.c b/libmount/src/optmap.c index 4f11ce598..68217cebe 100644 --- a/libmount/src/optmap.c +++ b/libmount/src/optmap.c @@ -137,6 +137,10 @@ static const struct libmnt_optmap userspace_opts_map[] = { "group", MNT_MS_GROUP, MNT_NOMTAB }, /* Let the group of the device mount */ { "nogroup", MNT_MS_GROUP, MNT_INVERT | MNT_NOMTAB }, /* Device group has no special privs */ + /* + * Note that traditional init scripts assume _netdev option in /etc/mtab to + * umount network block devices on shutdown. + */ { "_netdev", MNT_MS_NETDEV }, /* Device requires network */ { "comment=", MNT_MS_COMMENT, MNT_NOHLPS | MNT_NOMTAB },/* fstab comment only */ -- cgit v1.2.3-55-g7522