[yast-commit] r51745 - in /trunk/ldap-server/src: LdapServer.pm agent/SlapdConfigAgent.cc
Author: rhafer Date: Wed Oct 1 15:14:00 2008 New Revision: 51745 URL: http://svn.opensuse.org/viewcvs/yast?rev=51745&view=rev Log: fixed test if the configration is still using the defaults-hash or if it has been read from libslapdconf (bnc#431250) Modified: trunk/ldap-server/src/LdapServer.pm trunk/ldap-server/src/agent/SlapdConfigAgent.cc Modified: trunk/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/LdapServer.pm?rev=51745&r1=51744&r2=51745&view=diff ============================================================================== --- trunk/ldap-server/src/LdapServer.pm (original) +++ trunk/ldap-server/src/LdapServer.pm Wed Oct 1 15:14:00 2008 @@ -34,6 +34,7 @@ my %error = ( msg => undef, details => undef ); my $usingDefaults = 1; +my $readConfig = 0; my $configured = 0; my $usesBackConfig = 0; my $slapdConfChanged = 0; @@ -231,6 +232,7 @@ SCR->Execute('.ldapserver.init' ); my $rc = SCR->Read('.ldapserver.databases'); $usingDefaults = 0; + $readConfig = 1; } else { @@ -936,7 +938,7 @@ # Configuration summary text for autoyast my $self = shift; my $string; - if ( keys(%dbDefaults) && $usingDefaults ) + if ( keys(%dbDefaults) && ! $readConfig ) { $string .= '<h2>'._("Startup Configuration").'</h2>' .'<p>'._("Start LDAP Server: ").'<code>'.($dbDefaults{'serviceEnabled'}->value?_("Yes"):_("No")).'</code></p>' @@ -1421,6 +1423,7 @@ { bind_dn => $dbDefaults{'rootdn'}, bind_pw => $dbDefaults{'rootpw_clear'} } ); $usingDefaults = 0; + $readConfig = 1; return 1; } Modified: trunk/ldap-server/src/agent/SlapdConfigAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/agent/SlapdConfigAgent.cc?rev=51745&r1=51744&r2=51745&view=diff ============================================================================== --- trunk/ldap-server/src/agent/SlapdConfigAgent.cc (original) +++ trunk/ldap-server/src/agent/SlapdConfigAgent.cc Wed Oct 1 15:14:00 2008 @@ -111,6 +111,7 @@ return ConfigToLdif(); } } catch ( std::runtime_error e ) { + y2error("Error during Read: %s", e.what() ); lastError->add(YCPString("summary"), YCPString(std::string( e.what() ) ) ); lastError->add(YCPString("description"), YCPString("") ); return YCPBoolean(false); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rhafer@svn.opensuse.org