Author: rhafer Date: Tue Aug 30 10:27:29 2011 New Revision: 65436 URL: http://svn.opensuse.org/viewcvs/yast?rev=65436&view=rev Log: Display an error message when waiting for Background task failed, instead of just aborting (bnc#714723) Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/LdapServer.pm branches/SuSE-Code-11-SP2-Branch/ldap-server/src/agent/SlapdConfigAgent.cc Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/ldap-server/src/LdapServer.pm?rev=65436&r1=65435&r2=65436&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/ldap-server/src/LdapServer.pm (original) +++ branches/SuSE-Code-11-SP2-Branch/ldap-server/src/LdapServer.pm Tue Aug 30 10:27:29 2011 @@ -999,7 +999,13 @@ # before restarting the server (bnc#450457) Progress->NextStage(); y2milestone("slapd might be running a background task, waiting for completion"); - SCR->Execute('.ldapserver.waitForBackgroundTasks') ; + if (! SCR->Execute('.ldapserver.waitForBackgroundTasks') ) { + y2error("Error while waiting for background task."); + $self->SetError( _("An error happend while waiting for waiting for the OpenLDAP database indexer to finish.\n"). + _("Please restart OpenLDAP manually.") ); + Progress->Finish(); + return 0; + } y2milestone("background tasks completed"); Progress->NextStage(); Service->Restart("ldap"); Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/agent/SlapdConfigAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/ldap-server/src/agent/SlapdConfigAgent.cc?rev=65436&r1=65435&r2=65436&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/ldap-server/src/agent/SlapdConfigAgent.cc (original) +++ branches/SuSE-Code-11-SP2-Branch/ldap-server/src/agent/SlapdConfigAgent.cc Tue Aug 30 10:27:29 2011 @@ -452,8 +452,14 @@ } else if ( path->component_str(0) == "waitForBackgroundTasks" ) { - olc.waitForBackgroundTasks(); - return YCPBoolean(true); + bool ret = true; + try { + olc.waitForBackgroundTasks(); + } catch ( std::runtime_error e ) { + ret = false; + } + + return YCPBoolean(ret); } else if ( path->component_str(0) == "addRootSaslRegexp" ) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org