summaryrefslogtreecommitdiffstats
path: root/ldap_wizard/Ldap.pm
diff options
context:
space:
mode:
authorVicent Guardiola <vguardiola@mandriva.com>2004-08-20 05:31:43 +0000
committerVicent Guardiola <vguardiola@mandriva.com>2004-08-20 05:31:43 +0000
commitc404159d960896a845ad20f5ac321f6435357bbb (patch)
treebc54dfae9ee0f6298db135154cfbad8a9b7d10a8 /ldap_wizard/Ldap.pm
parent5f60e8da48e1b28d50176813a31cfc7bf8d65dff (diff)
downloaddrakwizard-c404159d960896a845ad20f5ac321f6435357bbb.tar
drakwizard-c404159d960896a845ad20f5ac321f6435357bbb.tar.gz
drakwizard-c404159d960896a845ad20f5ac321f6435357bbb.tar.bz2
drakwizard-c404159d960896a845ad20f5ac321f6435357bbb.tar.xz
drakwizard-c404159d960896a845ad20f5ac321f6435357bbb.zip
Add new step if server is already configured
Diffstat (limited to 'ldap_wizard/Ldap.pm')
-rw-r--r--ldap_wizard/Ldap.pm31
1 files changed, 23 insertions, 8 deletions
diff --git a/ldap_wizard/Ldap.pm b/ldap_wizard/Ldap.pm
index d3604ebd..c3871d6e 100644
--- a/ldap_wizard/Ldap.pm
+++ b/ldap_wizard/Ldap.pm
@@ -48,13 +48,14 @@ my $o = {
nom => '',
prenom => '',
},
+ needed_rpm => [ 'openldap-server','openldap-client' ],
};
my $ldap_suffix=join(',dc=', split(/\./, chomp_(`hostname -f`)));
$ldap_suffix =~ s/[^,]*,//;
-my $conf_file = "/etc/sysconfig/ldapconf";
+my $conf_file = "/etc/sysconfig/ldapwiz";
my $LDAPCONF = "/etc/openldap/slapd.conf";
#my $rootdn_cn = "Admin";
##### Read conf file is exist
@@ -92,11 +93,11 @@ $o->{pages} = {
return 'add_userposix';
}
- if ($o->{var}{wiz_level} == 1) {
- ! -f $conf_file and $::in->ask_yesorno(N("Information "), N("Would you like save an existing OpenLDAP configuration ?")) and return 'sav_old_conf';
- return 'set_srv';
- }
- },
+
+ if ($o->{var}{wiz_level} == 1) {
+ -f $conf_file and return 'resume';
+ }
+ },
data => [
{ label => N("Your choice:") . "\n\n", val => \$o->{var}{wiz_level}, type => 'list', list => [ keys %level ], format => sub { $level{$_[0]} } },
@@ -154,7 +155,7 @@ $o->{pages} = {
name => N("Configuring LDAP Server"),
data => [
{ label => N("LDAP Suffix:\n ex: dc=example,dc=com\n"), val => \$o->{var}{suffix}, help => N("aide p") },
- { label => N("LDAP Administrator:\n "), val => \$o->{var}{rootdn}, help => N("aide p") },
+ { label => N("LDAP Administrator:\n ex: cn=admin,dc=example,dc=com\n"), val => \$o->{var}{rootdn}, help => N("aide p") },
{ label => N("LDAP Password:"), hidden => 1, val => \$o->{var}{rootpass}, help => N("aide p") },
{ label => N("LDAP Password (again):"), hidden => 1, val => \$o->{var}{rootpass2}, help => N("aide p") },
],
@@ -191,8 +192,8 @@ $o->{pages} = {
data => [
{ label => N("Organisation LDAP:"), type => 'field', fixed_val => \$o->{var}{suffix} },
{ label => N("Administrator LDAP:"), type => 'field', fixed_val => \$o->{var}{rootdn} },
-# { label => N("Arbo LDAP:"), type => 'field', fixed_val => " " },
{ label => "", type => 'field', fixed_val => \$o->{var}{suffix} },
+ { label => N("Users Container :"), type => 'field', fixed_val => \$o->{var}{defou} },
],
post => \&do_it_setldap,
next => 'end'
@@ -211,6 +212,20 @@ $o->{pages} = {
end => 1,
next => 0,
},
+ resume => {
+ name => N("Server already configured"),
+ post => sub {
+ my $container_ou = $o->{var}{wiz_level}.",".$o->{var}{suffix};
+ },
+ data => [ { label => N("You have already configure your OpenLDAP Server with drakwizard\n") } ,
+ { label => N("Organisation LDAP:"), type => 'field', fixed_val => \$o->{var}{suffix} },
+ { label => N("Administrator LDAP:"), type => 'field', fixed_val => \$o->{var}{rootdn} },
+ { label => N("Users Container :"), type => 'field', fixed_val => \$o->{var}{defou} },
+ ],
+ no_back => 1,
+ end => 1,
+ next => 0,
+ },
};
sub do_it_setldap {