Mailinglist Archive: yast-devel (46 mails)

< Previous Next >
Re: [yast-devel] Re: [yast-commit] r64596 - NFSv4 in autoyast
Martin Vidner write:
On Mon, Jun 27, 2011 at 10:45:57AM -0000, jreidinger@xxxxxxxxxxxxxxxxx wrote:
Author: jreidinger
Date: Mon Jun 27 12:45:54 2011
New Revision: 64596

URL: http://svn.opensuse.org/viewcvs/yast?rev=64596&view=rev
Log:
fix enablement of NFSv4 in autoyast (bnc#684859)

That bug was on myself and you helped me out, thanks, but I could
not resist checking the gift horse's teeth...


Modified:
branches/SuSE-Code-11-SP2-Branch/nfs-client/src/Nfs.ycp
branches/SuSE-Code-11-SP2-Branch/nfs-client/src/ui.ycp

Modified: branches/SuSE-Code-11-SP2-Branch/nfs-client/src/Nfs.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/nfs-client/src/Nfs.ycp?rev=64596&r1=64595&r2=64596&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/nfs-client/src/Nfs.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/nfs-client/src/Nfs.ycp Mon Jun 27
12:45:54 2011
@@ -72,7 +72,7 @@
*/
global list<map> non_nfs_entries = [];

- global boolean nfs4_enabled = false;
+ global boolean nfs4_enabled = nil;

It is quite not obvious what nil means here.

it is tristate variable, where nil means do not change current value ( it is
easier that loking into autoyast profile if user manually overwrite nfs4
activation sysconfig value.)


It is even less obvious how the entire patch changes the
interpretation of the nfs part of the autoyast profile.

OK, if user has at least one nfs4 mount point, then force nfs4 activation.
Otherwise keep current value ( so customer can explicitelly overwrite default
in sysconfig section of autoyast profile.


We should also update
http://svn.opensuse.org/svn/yast/trunk/autoinstallation/doc/NFSSection.xml
http://svn.opensuse.org/svn/yast/trunk/autoinstallation/doc/examples/example.nfs-new.xml
(which makes me notice that we broke profile compatibility for
SLES12 there, ugh)

Sorry, I am not much familiar with our documentation procedures for autoyast.
Btw I don't see how my change broke profile compatibility?
Pepa



global string idmapd_domain = "";

@@ -124,6 +124,11 @@
if ( !haskey(s, "vfstype") )
{
s["vfstype"] = "nfs";
+ } else {
+ if (s["vfstype"]:"nfs" == "nfs4")
+ {
+ nfs4_enabled = true;
+ }
}
return s;

@@ -357,16 +362,15 @@
Service::Enable("nfsboot");
}

- if(nfs4_enabled)
+ if(nfs4_enabled == true)
{
SCR::Write(.sysconfig.nfs.NFS4_SUPPORT,"yes");
SCR::Write(.etc.idmapd_conf, ["Domain", idmapd_domain] );
}
- else
+ else if (nfs4_enabled == false)
{
SCR::Write(.sysconfig.nfs.NFS4_SUPPORT,"no");
}
-
boolean progress_orig = Progress::set (false);
SuSEFirewall::WriteOnly ();
Progress::set (progress_orig);
@@ -518,7 +522,7 @@
{
if (Service::Start( portmapper ) == false)
{
- y2warning( sformat("%1 cannot be started", portmapper) );
+ y2warning("%1 cannot be started", portmapper);
return nil;
}
}

Modified: branches/SuSE-Code-11-SP2-Branch/nfs-client/src/ui.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/nfs-client/src/ui.ycp?rev=64596&r1=64595&r2=64596&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/nfs-client/src/ui.ycp (original)
+++ branches/SuSE-Code-11-SP2-Branch/nfs-client/src/ui.ycp Mon Jun 27
12:45:54 2011
@@ -570,8 +570,8 @@
void InitSettings( )
{
CWMFirewallInterfaces::OpenFirewallInit (fw_cwm_widget, "");
- UI::ChangeWidget(`id(`enable_nfs4), `Value, Nfs::nfs4_enabled);
- UI::ChangeWidget( `id(`nfs4_domain), `Enabled, Nfs::nfs4_enabled);
+ UI::ChangeWidget(`id(`enable_nfs4), `Value, Nfs::nfs4_enabled !=
false);
+ UI::ChangeWidget( `id(`nfs4_domain), `Enabled, Nfs::nfs4_enabled !=
false);
UI::ChangeWidget(`id(`nfs4_domain), `Value, Nfs::idmapd_domain);
}




--
Josef Reidinger
Appliance Toolkit team
maintaining parts of webyast and SLMS
author of rubygems - studio_api and net_observer (coauthor)
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References