Skip to content

Commit

Permalink
fix enablement of NFSv4 in autoyast (bnc#684859)
Browse files Browse the repository at this point in the history
svn path=/branches/SuSE-Code-11-SP2-Branch/nfs-client/; revision=64596
  • Loading branch information
jreidinger committed Jun 27, 2011
1 parent c86fe66 commit 25895b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions src/Nfs.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
*/
global list<map> non_nfs_entries = [];

global boolean nfs4_enabled = false;
global boolean nfs4_enabled = nil;

global string idmapd_domain = "";

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

Expand Down Expand Up @@ -357,16 +362,15 @@ the NFS client configuration.\n"));
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);
Expand Down Expand Up @@ -518,7 +522,7 @@ the NFS client configuration.\n"));
{
if (Service::Start( portmapper ) == false)
{
y2warning( sformat("%1 cannot be started", portmapper) );
y2warning("%1 cannot be started", portmapper);
return nil;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ rights.</p>") + fw_cwm_widget["help"]:"";
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);
}

Expand Down

0 comments on commit 25895b2

Please sign in to comment.