[yast-commit] r48596 - in /trunk/ldap-server/src: LdapServer.pm complex.ycp ldap-server.ycp wizards.ycp
Author: rhafer Date: Fri Jun 27 15:57:03 2008 New Revision: 48596 URL: http://svn.opensuse.org/viewcvs/yast?rev=48596&view=rev Log: Reworked startup code, start proposal upon first run of yast2-ldap-server Modified: trunk/ldap-server/src/LdapServer.pm trunk/ldap-server/src/complex.ycp trunk/ldap-server/src/ldap-server.ycp trunk/ldap-server/src/wizards.ycp Modified: trunk/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/LdapServer.pm?rev=48596&r1=48595&r2=48596&view=diff ============================================================================== --- trunk/ldap-server/src/LdapServer.pm (original) +++ trunk/ldap-server/src/LdapServer.pm Fri Jun 27 15:57:03 2008 @@ -51,8 +51,9 @@ Progress->New("Initializing LDAP Server Configuration", "Blub", 3, $progressItems, $progressItems, ""); Progress->NextStage(); my $serviceInfo = Service->FullInfo("ldap"); - my $isRunning = $serviceInfo->{"started"} == 0; # 0 == "running" - my $isEnabled = $serviceInfo->{"start"} > 0; + my $isRunning = $serviceInfo->{"started"} && $serviceInfo->{"started"} == 0; # 0 == "running" + my $isEnabled = $serviceInfo->{"start"} && $serviceInfo->{"start"} > 0; + y2milestone("Serviceinfo: ". Data::Dumper->Dump([$serviceInfo])); y2milestone("IsRunning: " . $isRunning . " IsEnabled " . $isEnabled); Modified: trunk/ldap-server/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/complex.ycp?rev=48596&r1=48595&r2=48596&view=diff ============================================================================== --- trunk/ldap-server/src/complex.ycp (original) +++ trunk/ldap-server/src/complex.ycp Fri Jun 27 15:57:03 2008 @@ -160,7 +160,7 @@ y2milestone("OpenLDAP using backConfig: %1", hasBackconfig); y2milestone("OpenLDAP modifed config: %1", configModified); string configFile = "/etc/openldap/slapd.conf"; - if ( !hasBackconfig ) + if ( !hasBackconfig && configModified ) { switchToBackConfig = Popup::ContinueCancelHeadline( _("Convert to \"Back-Config\"?"), _("Your system is currently configured to use the @@ -169,33 +169,24 @@ database of OpenLDAP (back-config).")); if (switchToBackConfig) { - if ( configModified ) - { - convert = Popup::YesNoHeadline( _("Convert existing configuration?"), + convert = Popup::YesNoHeadline( _("Convert existing configuration?"), _("Do you want to convert your existing configuration files, to the dynamic configuration backend? Note: This will remove any preexisting configuration data from \"/etc/openldap/slapd.d/\". If you click \"No\" here, an empty configuration will be created")); - if (convert) + if (convert) + { + // Convert the existing configuration and after that + // re-read it. + if (! LdapServer::MigrateSlapdConf()) { - // Convert the existing configuration and after that - // re-read it. - if (! LdapServer::MigrateSlapdConf()) - { - y2milestone("LdapServer::MigrateSlapdConf failed"); - DisplayError( LdapServer::GetError() ); - return `abort; - } - LdapServer::Read(); + y2milestone("LdapServer::MigrateSlapdConf failed"); + DisplayError( LdapServer::GetError() ); + return `abort; } - } - else - { - // Start new config wizward - LdapServer::InitDbDefaults(); - return `initial; + LdapServer::Read(); } } else @@ -203,6 +194,12 @@ return `abort; } } + else + { + // Start new config wizward + LdapServer::InitDbDefaults(); + return `initial; + } return ret ? `next : `abort; } Modified: trunk/ldap-server/src/ldap-server.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/ldap-server.ycp?rev=48596&r1=48595&r2=48596&view=diff ============================================================================== --- trunk/ldap-server/src/ldap-server.ycp (original) +++ trunk/ldap-server/src/ldap-server.ycp Fri Jun 27 15:57:03 2008 @@ -273,7 +273,7 @@ ]; /* is this proposal or not? */ -boolean propose = true; +boolean propose = false; list args = WFM::Args(); if(size(args) > 0) { if(is(WFM::Args(0), path) && WFM::Args(0) == .propose) { Modified: trunk/ldap-server/src/wizards.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/wizards.ycp?rev=48596&r1=48595&r2=48596&view=diff ============================================================================== --- trunk/ldap-server/src/wizards.ycp (original) +++ trunk/ldap-server/src/wizards.ycp Fri Jun 27 15:57:03 2008 @@ -109,6 +109,7 @@ map aliases = $[ "read" : ``( ReadDialog() ), + "propose" : ``( ProposalSequence() ), "main" : ``( MainSequence() ), "write" : ``( WriteDialog() ) ]; @@ -117,11 +118,11 @@ "ws_start" : "read", "read" : $[ `abort : `abort, - `initial : "proposal", + `initial : "propose", `next : "main" ], - "proposal" : $[ - `next : "write" + "propose" : $[ + `next : `next ], "main" : $[ `abort : `abort, -- 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