[yast-commit] r64408 - in /branches/SuSE-Code-11-SP2-Branch/ldap-server/src: LdapServer.pm dialogs.ycp
![](https://seccdn.libravatar.org/avatar/ffa558b8f6843b21210a80e95b0ca8a5.jpg?s=120&d=mm&r=g)
Author: rhafer
Date: Thu Jun 16 13:23:48 2011
New Revision: 64408
URL: http://svn.opensuse.org/viewcvs/yast?rev=64408&view=rev
Log:
Add Checkbox to enable MirrorMode
will result in a ServerId being assinged to the Master
Modified:
branches/SuSE-Code-11-SP2-Branch/ldap-server/src/LdapServer.pm
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=64408&r1=64407&r2=64408&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 Thu Jun 16 13:23:48 2011
@@ -45,6 +45,7 @@
my $overwriteConfig = 0;
my $setupSyncreplSlave = 0;
my $setupSyncreplMaster = 0;
+my $setupMirrorMode = 0;
my $modeInstProposal = 0;
my $serviceEnabled = 0;
my $serviceRunning = 1;
@@ -1807,6 +1808,10 @@
$self->UpdateDatabase(0 ,$changes);
if ( $self->ReadSetupMaster() )
{
+ if ( $self->ReadSetupMirrorMode() )
+ {
+ $self->AssignServerId();
+ }
# create helpful indexes for syncrepl
$self->ChangeDatabaseIndex(1, { "name" => "entryUUID", "eq" => 1 } );
$self->ChangeDatabaseIndex(1, { "name" => "entryCSN", "eq" => 1 } );
@@ -3192,6 +3197,30 @@
}
##
+ # Set "true" here if we are setting up a Syncrepl Master for acting as a
+ # MirrorMode Node. (it will result in a olcServerId being created)
+ # (this function is only useful for the installation wizards)
+ #
+ # @return true
+ #
+BEGIN { $TYPEINFO {WriteSetupMirrorMode} = ["function", "boolean", "boolean"]; }
+sub WriteSetupMirrorMode
+{
+ my ($self, $value) = @_;
+ $setupMirrorMode=$value;
+}
+
+##
+ # @return true, if the current setup will create a Syncrepl Mirror Mode Master
+ # false otherwise
+ #
+BEGIN { $TYPEINFO {ReadSetupMirrorMode} = ["function", "boolean" ]; }
+sub ReadSetupMirrorMode
+{
+ return $setupMirrorMode;
+}
+
+##
# Initializes the ldapserver agent to connect to a remote cn=config database
# @param A Map containing the details for the remote connections. Required keys:
# "provider": A Map with the keys "protocol" (can be "ldap" or "ldaps"),
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=64408&r1=64407&r2=64408&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 Thu Jun 16 13:23:48 2011
@@ -1053,7 +1053,9 @@
`VSpacing( 0.5 ),
`Password( `id( `te_rootpw ), `opt( `hstretch ), _("Enter new &Password") ),
`VSpacing( 0.5 ),
- `Password( `id( `te_valid_rootpw ), `opt( `hstretch ), _("&Validate Password") )
+ `Password( `id( `te_valid_rootpw ), `opt( `hstretch ), _("&Validate Password") ),
+ `VSpacing( 0.5 ),
+ `CheckBox( `id( `cb_mirror_mode ), _("MirrorMode") )
)
)
);
@@ -1089,6 +1091,7 @@
map
participants (1)
-
rhafer@svn2.opensuse.org