[yast-commit] r52702 - in /trunk/nfs-client/src: Nfs.ycp nfs-client4part.ycp
Author: kmachalkova Date: Wed Oct 29 17:59:31 2008 New Revision: 52702 URL: http://svn.opensuse.org/viewcvs/yast?rev=52702&view=rev Log: Initialize non-fstab NFS settings (firewall, sysconfig, idmapd) if the client is run embedded in the partitioner (#436897) Modified: trunk/nfs-client/src/Nfs.ycp trunk/nfs-client/src/nfs-client4part.ycp Modified: trunk/nfs-client/src/Nfs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/Nfs.ycp?rev=52702&r1=52701&r2=52702&view=diff ============================================================================== --- trunk/nfs-client/src/Nfs.ycp (original) +++ trunk/nfs-client/src/Nfs.ycp Wed Oct 29 17:59:31 2008 @@ -36,6 +36,9 @@ /* default value of settings modified */ global boolean modified = false; + /* Should fstab reading be skipped ? (yes if we're + embedded in partitioner) */ + global boolean skip_fstab = false; /** * Function sets internal variable, which indicates, that any @@ -245,22 +248,29 @@ * @return true on success */ global define boolean Read () ``{ - list<map<string,any> > fstab = (list<map<string,any> >) SCR::Read (.etc.fstab); - fstab = UnescapeSpaces (fstab); - y2milestone ("fstab: %1", fstab); - // For simplicity, this leaves also the unused fileds in the maps. - nfs_entries = filter (map<string,any> entry, fstab, ``{ - return (entry["vfstype"]:"" == "nfs" || entry["vfstype"]:"" == "nfs4"); - }); - non_nfs_entries = filter (map entry, fstab, ``{ - return (entry["vfstype"]:"" != "nfs"); - }); + //Read /etc/fstab if we're running standalone (otherwise, libstorage does the job) + if( !skip_fstab ) + { + list<map<string,any> > fstab = (list<map<string,any> >) SCR::Read (.etc.fstab); + fstab = UnescapeSpaces (fstab); + y2milestone ("fstab: %1", fstab); + + // For simplicity, this leaves also the unused fileds in the maps. + nfs_entries = filter (map<string,any> entry, fstab, ``{ + return (entry["vfstype"]:"" == "nfs" || entry["vfstype"]:"" == "nfs4"); + }); + non_nfs_entries = filter (map entry, fstab, ``{ + return (entry["vfstype"]:"" != "nfs"); + }); + } nfs4_enabled = (SCR::Read(.sysconfig.nfs.NFS4_SUPPORT)=="yes"); idmapd_domain = (string) SCR::Read(.etc.idmapd_conf, "Domain"); + boolean progress_orig = Progress::set(false); SuSEFirewall::Read (); + Progress::set(progress_orig); portmapper = FindPortmapper(); //There is neither rpcbind nor portmap Modified: trunk/nfs-client/src/nfs-client4part.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/nfs-client4part.ycp?rev=52702&r1=52701&r2=52702&view=diff ============================================================================== --- trunk/nfs-client/src/nfs-client4part.ycp (original) +++ trunk/nfs-client/src/nfs-client4part.ycp Wed Oct 29 17:59:31 2008 @@ -56,18 +56,22 @@ "mntops": entry["fstopt"]:"" ]); }); - y2milestone("jezibaba %1", Nfs::nfs_entries); + y2milestone("Nfs shares imported from storage %1", Nfs::nfs_entries); nfs_entries = Nfs::nfs_entries; InitFstabEntries(); } + else if (func == "Read") + { + Nfs::skip_fstab = true; + Nfs::Read(); + } else if (func == "HandleEvent") { any widget_id = param["widget_id"]:nil; list <symbol> w_ids = [ `newbut, `editbut, `delbut ]; HandleEvent( widget_id); - y2milestone("jezibaba %1", nfs_entries); y2milestone("%1", modify_line); Nfs::nfs_entries = nfs_entries; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org