Author: rhafer Date: Fri Jun 27 15:57:10 2008 New Revision: 48598 URL: http://svn.opensuse.org/viewcvs/yast?rev=48598&view=rev Log: Enable ldapi by default and (re)start LDAP server after initial config Modified: trunk/ldap-server/src/LdapServer.pm 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=48598&r1=48597&r2=48598&view=diff ============================================================================== --- trunk/ldap-server/src/LdapServer.pm (original) +++ trunk/ldap-server/src/LdapServer.pm Fri Jun 27 15:57:10 2008 @@ -123,6 +123,7 @@ Progress->New("Writing OpenLDAP Server Configuration", "", 4, $progressItems, $progressItems, ""); Progress->NextStage(); + my $rc = SCR->Write('.sysconfig.openldap.OPENLDAP_CONFIG_BACKEND', 'ldap'); if ( ! $rc ) { @@ -131,8 +132,17 @@ Progress->Finish(); return 0; } + $rc = SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAPI', 'yes'); + if ( ! $rc ) + { + y2error("Error while enabling LDAPI listener"); + $self->SetError( _("Enabling thi LDAPI Protocol listener failed.") ); + Progress->Finish(); + return 0; + } Progress->NextStage(); + $rc = SCR->Execute('.target.bash', 'rm -rf /etc/openldap/slapd.d/cn=config*' ); if ( $rc ) { @@ -172,6 +182,23 @@ } Progress->NextStage(); + $rc = Service->Enable("ldap"); + if ( ! $rc ) + { + y2error("Error while enabing the LDAP Service: ". Service->Error() ); + $self->SetError( _("Enabling the LDAP Service failed.") ); + Progress->Finish(); + return 0; + } + $rc = Service->Restart("ldap"); + if (! $rc ) + { + y2error("Error while starting the LDAP service"); + $self->SetError( _("Starting the LDAP service failed.") ); + Progress->Finish(); + return 0; + } + Progress->Finish(); sleep(1); return $ret; Modified: trunk/ldap-server/src/wizards.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/wizards.ycp?rev=48598&r1=48597&r2=48598&view=diff ============================================================================== --- trunk/ldap-server/src/wizards.ycp (original) +++ trunk/ldap-server/src/wizards.ycp Fri Jun 27 15:57:10 2008 @@ -122,7 +122,8 @@ `next : "main" ], "propose" : $[ - `next : `next + `next : `next, + `abort : `abort ], "main" : $[ `abort : `abort, -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org