Author: jreidinger
Date: Wed Jun 22 14:49:17 2011
New Revision: 64548
URL: http://svn.opensuse.org/viewcvs/yast?rev=64548&view=rev
Log:
allow to set version of nfs on command line (bnc#681275)
Modified:
trunk/nfs-client/ (props changed)
trunk/nfs-client/src/nfs.ycp
Modified: trunk/nfs-client/src/nfs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/nfs.ycp?rev=64548&r1=64547&r2=64548&view=diff
==============================================================================
--- trunk/nfs-client/src/nfs.ycp (original)
+++ trunk/nfs-client/src/nfs.ycp Wed Jun 22 14:49:17 2011
@@ -93,6 +93,14 @@
return false;
}
+ string type = options["type"]:"nfs";
+ if (type != "nfs" && type != "nfs4")
+ {
+ Report::Error (_("Unknown value for option \"type\"."));
+ return false;
+ }
+ options["vfstype"] = type;
+
nfs_entries = add (nfs_entries, (map) options);
Nfs::nfs_entries = nfs_entries;
return true;
@@ -116,6 +124,18 @@
CommandLine::Print (_("No NFS mount specified."));
return false;
}
+
+ string type = options["type"]:"nfs";
+ if (type != "nfs" && type != "nfs4")
+ {
+ Report::Error (_("Unknown value for option \"type\"."));
+ return false;
+ }
+ if (haskey(options,"type"))
+ {
+ options["vfstype"] = type;
+ }
+
list<integer> entries = [];
integer i = 0;
foreach (map entry, nfs_entries, {
@@ -260,12 +280,18 @@
// fstab(5): fs_mntops
"help" : _("Mount options"),
],
+ "type" : $[
+ "type" : "string", // nfs or nfs4
+ // command line option help
+ // fstab(5): fs_type
+ "help" : _("File system id, supported nfs and nfs4. Default value is nfs."),
+ ],
],
"mappings" : $[
"list" : [],
- "add" : ["spec", "file", "mntops",],
+ "add" : ["spec", "file", "mntops","type",],
// either of spec and file is key
- "edit" : ["spec", "file", "mntops",],
+ "edit" : ["spec", "file", "mntops","type",],
// either of spec and file is key
"delete" : ["spec", "file",],
]
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org