Author: kmachalkova Date: Fri Apr 11 17:13:42 2008 New Revision: 46430 URL: http://svn.opensuse.org/viewcvs/yast?rev=46430&view=rev Log: UI support for mounting nfsv4 shares (fate #302031) Modified: trunk/nfs-client/src/Nfs.ycp trunk/nfs-client/src/routines.ycp trunk/nfs-client/src/ui.ycp Modified: trunk/nfs-client/src/Nfs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/Nfs.ycp?rev=46430&... ============================================================================== --- trunk/nfs-client/src/Nfs.ycp (original) +++ trunk/nfs-client/src/Nfs.ycp Fri Apr 11 17:13:42 2008 @@ -222,7 +222,7 @@ // For simplicity, this leaves also the unused fileds in the maps. nfs_entries = filter (map<string,any> entry, fstab, ``{ - return (entry["vfstype"]:"" == "nfs"); + return (entry["vfstype"]:"" == "nfs" || entry["vfstype"]:"" == "nfs4"); }); non_nfs_entries = filter (map entry, fstab, ``{ return (entry["vfstype"]:"" != "nfs"); @@ -246,7 +246,7 @@ list<map<string,any> > fstab = (list<map<string,any> >) SCR::Read (.etc.fstab); // unescape deferred for optimization fstab = filter (map<string,any> entry, fstab, ``{ - return (entry["vfstype"]:"" != "nfs"); + return (entry["vfstype"]:"" != "nfs" || entry["vfstype"]:"" != "nfs4"); }); fstab = UnescapeSpaces (fstab); foreach (map<string,any> entry, nfs_entries, ``{ Modified: trunk/nfs-client/src/routines.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/routines.ycp?rev=4... ============================================================================== --- trunk/nfs-client/src/routines.ycp (original) +++ trunk/nfs-client/src/routines.ycp Fri Apr 11 17:13:42 2008 @@ -53,6 +53,7 @@ sp[0]:"" + " ", sp[1]:"" + " ", entry["file"]:"" + " ", + entry["vfstype"]:" ", entry["mntops"]:"" + " "); count = count+1; Modified: trunk/nfs-client/src/ui.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/ui.ycp?rev=46430&a... ============================================================================== --- trunk/nfs-client/src/ui.ycp (original) +++ trunk/nfs-client/src/ui.ycp Fri Apr 11 17:13:42 2008 @@ -191,6 +191,7 @@ string server = ""; string pth = ""; string mount = ""; + boolean nfs4 = false; string options = "defaults"; list <string> servers = [ ]; @@ -200,6 +201,7 @@ server = couple[0]:""; pth = couple[1]:""; mount = fstab_ent["file"]:""; + nfs4 = fstab_ent["vfstype"]:"" == "nfs4"; options = fstab_ent["mntops"]:""; servers = [ server ]; } @@ -230,7 +232,7 @@ TextAndButton ( `TextEntry(`id(`pathent), // textentry label - _("&Remote File System"), pth), + _("&Remote Directory"), pth), // pushbutton label, // select from a list of remote filesystems // make it short @@ -249,6 +251,8 @@ ) ), // textentry label + `VSpacing(0.2), + `CheckBox(`id(`nfs4),"NFS&v4 Share", nfs4), `TextEntry(`id(`optionsent), _("O&ptions"), options), `VSpacing(0.2), `HBox( @@ -327,6 +331,7 @@ server = (string) UI::QueryWidget(`id(`serverent), `Value); pth = StripExtraSlash ((string) UI::QueryWidget(`id(`pathent), `Value)); mount = StripExtraSlash ((string) UI::QueryWidget(`id(`mountent), `Value)); + nfs4 = (boolean) UI::QueryWidget(`id(`nfs4), `Value); options = deletechars ((string) UI::QueryWidget(`id(`optionsent), `Value), " "); ret = nil; @@ -353,6 +358,7 @@ fstab_ent = $[ "spec" : server+":"+pth, "file" : mount, + "vfstype" : nfs4 ? "nfs4" : "nfs", "mntops" : options, ]; ret = `ok; @@ -439,11 +445,12 @@ `header( // table header _("Server")+" ", - // table header - _("Remote File System")+" ", + _("Remote Directory")+" ", // table header _("Mount Point")+" ", // table header + _("NFS Type"), + // table header _("Options")+" "), FstabTableItems(nfs_entries)), `HBox(`PushButton(`id(`newbut), `opt (`key_F3), -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org