[yast-commit] r65433 - in /branches/SuSE-Code-11-SP2-Branch/ldap-server/src: LdapServer.pm complex.ycp dialogs.ycp
Author: rhafer Date: Tue Aug 30 10:27:18 2011 New Revision: 65433 URL: http://svn.opensuse.org/viewcvs/yast?rev=65433&view=rev Log: Allow configuration changes when the init script is disabled but the server is running. (Needed e.g. when the service is managed by a HA resource agent instead of init-scripts) (bnc#714719) Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/LdapServer.pm branches/SuSE-Code-11-SP2-Branch/ldap-server/src/complex.ycp branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp 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=65433&r1=65432&r2=65433&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:18 2011 @@ -652,7 +652,7 @@ Progress->Finish(); return 0; } - elsif ( ! $serviceRunning && $serviceEnabled ) + elsif ( (! $serviceRunning && $serviceEnabled) || $restartRequired ) { my $progressItems = [_("Starting LDAP Server") ]; Progress->New(_("Restarting OpenLDAP Server"), "", 1, $progressItems, $progressItems, ""); @@ -1333,6 +1333,13 @@ return $serviceRunning; } +BEGIN { $TYPEINFO {WriteRestartRequired} = ["function", "boolean", "boolean"]; } +sub WriteRestartRequired { + my $self = shift; + $restartRequired = shift; + return 1; +} + BEGIN { $TYPEINFO {ReadSLPEnabled} = ["function", "boolean"]; } sub ReadSLPEnabled { y2milestone("ReadSLPEnabled"); Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/ldap-server/src/complex.ycp?rev=65433&r1=65432&r2=65433&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/ldap-server/src/complex.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/ldap-server/src/complex.ycp Tue Aug 30 10:27:18 2011 @@ -100,7 +100,7 @@ LdapServer::InitDbDefaults(); return `initial; } - else if ( !serviceEnabled || !serviceRunning ) + else if ( !serviceRunning ) { symbol ret = Popup::AnyQuestion3( _("Existing configuration detected."), _("You have an existing configuration, but the LDAP server is currently not running. @@ -109,7 +109,7 @@ _("Restart"), Label::CancelButton(), _("New Configuration"), `focus_yes ); if ( ret == `yes ) { - LdapServer::WriteServiceEnabled( true ); + LdapServer::WriteRestartRequired( true ); return `reread; } else if (ret == `no ) Modified: branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp?rev=65433&r1=65432&r2=65433&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp (original) +++ branches/SuSE-Code-11-SP2-Branch/ldap-server/src/dialogs.ycp Tue Aug 30 10:27:18 2011 @@ -114,14 +114,7 @@ { //create new item term widget = nil; - if ( !LdapServer::ReadServiceEnabled() ) - { - if ( name != "daemon" ) { - Popup::Error( _("The LDAP Server is currently disabled, no configuration changes are possible.") ); - name = "daemon"; - } - } - else if ( !LdapServer::ReadServiceRunning() ) + if ( !LdapServer::ReadServiceRunning() ) { if ( name != "daemon" ) { symbol ret = Popup::AnyQuestion3( _("The LDAP Server is not running."), -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rhafer@svn2.opensuse.org