Blame SOURCES/nfs-utils-1.3.0-mount-nfsvers.patch

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