|
|
4e6e52 |
diff -up nfs-utils-1.3.0/utils/mount/configfile.c.orig nfs-utils-1.3.0/utils/mount/configfile.c
|
|
|
4e6e52 |
--- nfs-utils-1.3.0/utils/mount/configfile.c.orig 2017-10-05 11:44:08.775077208 -0400
|
|
|
4e6e52 |
+++ nfs-utils-1.3.0/utils/mount/configfile.c 2017-10-05 11:49:50.811349443 -0400
|
|
|
4e6e52 |
@@ -70,6 +70,7 @@ struct mnt_alias {
|
|
|
4e6e52 |
{"background", "bg", MNT_NOARG},
|
|
|
4e6e52 |
{"foreground", "fg", MNT_NOARG},
|
|
|
4e6e52 |
{"sloppy", "sloppy", MNT_NOARG},
|
|
|
4e6e52 |
+ {"nfsvers", "vers", MNT_UNSET},
|
|
|
4e6e52 |
};
|
|
|
4e6e52 |
int mnt_alias_sz = (sizeof(mnt_alias_tab)/sizeof(mnt_alias_tab[0]));
|
|
|
4e6e52 |
|
|
|
4e6e52 |
@@ -296,20 +297,21 @@ conf_parse_mntopts(char *section, char *
|
|
|
4e6e52 |
|
|
|
4e6e52 |
list = conf_get_tag_list(section, arg);
|
|
|
4e6e52 |
TAILQ_FOREACH(node, &list->fields, link) {
|
|
|
4e6e52 |
+ /* check first if this is an alias for another option */
|
|
|
4e6e52 |
+ field = mountopts_alias(node->field, &argtype);
|
|
|
4e6e52 |
/*
|
|
|
4e6e52 |
* Do not overwrite options if already exists
|
|
|
4e6e52 |
*/
|
|
|
4e6e52 |
- snprintf(buf, BUFSIZ, "%s=", node->field);
|
|
|
4e6e52 |
+ snprintf(buf, BUFSIZ, "%s=", field);
|
|
|
4e6e52 |
if (opts && strcasestr(opts, buf) != NULL)
|
|
|
4e6e52 |
continue;
|
|
|
4e6e52 |
|
|
|
4e6e52 |
- if (lookup_entry(node->field) != NULL)
|
|
|
4e6e52 |
+ if (lookup_entry(field) != NULL)
|
|
|
4e6e52 |
continue;
|
|
|
4e6e52 |
buf[0] = '\0';
|
|
|
4e6e52 |
value = conf_get_section(section, arg, node->field);
|
|
|
4e6e52 |
if (value == NULL)
|
|
|
4e6e52 |
continue;
|
|
|
4e6e52 |
- field = mountopts_alias(node->field, &argtype);
|
|
|
4e6e52 |
if (strcasecmp(value, "false") == 0) {
|
|
|
4e6e52 |
if (argtype != MNT_NOARG)
|
|
|
4e6e52 |
snprintf(buf, BUFSIZ, "no%s", field);
|