Author: rhafer Date: Thu Jul 31 17:15:18 2008 New Revision: 49551 URL: http://svn.opensuse.org/viewcvs/yast?rev=49551&view=rev Log: Write Protocol listener flags back to sysconfig Modified: trunk/ldap-server/src/LdapServer.pm trunk/ldap-server/src/tree_structure.ycp Modified: trunk/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/LdapServer.pm?rev=49551&r1=49550&r2=49551&view=diff ============================================================================== --- trunk/ldap-server/src/LdapServer.pm (original) +++ trunk/ldap-server/src/LdapServer.pm Thu Jul 31 17:15:18 2008 @@ -346,8 +346,6 @@ Progress->Finish(); return 0; } - $rc = SCR->Read('.sysconfig.openldap.OPENLDAP_START_LDAPI'); - y2milestone(Data::Dumper->Dump([$rc])); # FIXME: # Explicit cache flush, see bnc#350581 for details @@ -438,6 +436,33 @@ Progress->Finish(); return 1; } + + # these changes might require a restart of slapd + if ( $use_ldap_listener ) + { + SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAP', 'yes'); + } + else + { + SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAP', 'no'); + } + if ( $use_ldapi_listener ) + { + SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAPI', 'yes'); + } + else + { + SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAPI', 'no'); + } + if ( $use_ldaps_listener ) + { + SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAPS', 'yes'); + } + else + { + SCR->Write('.sysconfig.openldap.OPENLDAP_START_LDAPS', 'no'); + } + if( ! SCR->Execute('.ldapserver.commitChanges' ) ) { my $err = SCR->Error(".ldapserver"); @@ -1198,5 +1223,29 @@ return 0; } } + +BEGIN { $TYPEINFO {SetProtocolListenerEnabled} = ["function", "boolean", "string", "boolean" ]; } +sub SetProtocolListenerEnabled +{ + my ( $self, $protocol, $enabled ) = @_; + y2milestone("SetProtocolListenerEnabled $protocol $enabled"); + if ( $protocol eq "ldap" ) + { + $use_ldap_listener = $enabled; + } + elsif ( $protocol eq "ldapi" ) + { + $use_ldapi_listener = $enabled; + } + elsif ( $protocol eq "ldaps" ) + { + $use_ldaps_listener = $enabled; + } + else + { + return 0; + } + return 1; +} 1; # EOF Modified: trunk/ldap-server/src/tree_structure.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/tree_structure.ycp?rev=49551&r1=49550&r2=49551&view=diff ============================================================================== --- trunk/ldap-server/src/tree_structure.ycp (original) +++ trunk/ldap-server/src/tree_structure.ycp Thu Jul 31 17:15:18 2008 @@ -154,6 +154,33 @@ { LdapServer::SetServiceEnabled( false ); } + + if ( (boolean) UI::QueryWidget( `id( `cb_interface_ldap ), `Value ) ) + { + LdapServer::SetProtocolListenerEnabled( "ldap", true ); + } + else + { + LdapServer::SetProtocolListenerEnabled( "ldap", false ); + } + + if ( (boolean) UI::QueryWidget( `id( `cb_interface_ldaps ), `Value ) ) + { + LdapServer::SetProtocolListenerEnabled( "ldaps", true ); + } + else + { + LdapServer::SetProtocolListenerEnabled( "ldaps", false ); + } + + if ( (boolean) UI::QueryWidget( `id( `cb_interface_ldapi ), `Value ) ) + { + LdapServer::SetProtocolListenerEnabled( "ldapi", true ); + } + else + { + LdapServer::SetProtocolListenerEnabled( "ldapi", false ); + } return true; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org