summaryrefslogtreecommitdiffstats
path: root/ldap_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'ldap_wizard')
-rw-r--r--ldap_wizard/ldap.pm18
1 files changed, 9 insertions, 9 deletions
diff --git a/ldap_wizard/ldap.pm b/ldap_wizard/ldap.pm
index 5a8ddf09..ec92b6b7 100644
--- a/ldap_wizard/ldap.pm
+++ b/ldap_wizard/ldap.pm
@@ -35,7 +35,7 @@ my $o = {
rootdn => 'manager',
rootpass => 'secret',
cn => '',
- sn=> '',
+ sn => '',
uid => '',
uidpass => '',
lshell => '/bin/bash',
@@ -61,7 +61,7 @@ $o->{pages} = {
welcome => {
name => N("LDAP configuration wizard") . "\n\n" . N("Setup a LDAP server."),
no_back => 1,
- pre => sub { $o->{var}{wiz_level} ||= 1; },
+ pre => sub { $o->{var}{wiz_level} ||= 1 },
post => sub { if ($o->{var}{wiz_level} == 2) {
return 'add_user_posix';
}
@@ -191,7 +191,7 @@ sub rootdse_to_dc {
my ($data) = @_;
my @t = split(/\./, $data);
$o->{var}{dom} = $t[0];
- my $dcall = join( ',dc=', split(/\./, $data));
+ my $dcall = join(',dc=', split(/\./, $data));
return $dcall;
}
@@ -206,7 +206,7 @@ sub get_dc {
}
sub do_it_setldap {
- if (!-f $LDAPCONF) { die "no $LDAPCONF found"};
+ if (!-f $LDAPCONF) { die "no $LDAPCONF found" };
cp_af($LDAPCONF, $LDAPCONF . '.save');
if (!-f "$LDAPCONF.example") { cp_af($LDAPCONF, $LDAPCONF . '.example') };
cp_af($LDAPCONF . '.example', $LDAPCONF);
@@ -215,10 +215,10 @@ sub do_it_setldap {
# set suffix
if (any { /^suffix/ } cat_($LDAPCONF)) {
substInFile {
- s/suffix.*/suffix\t\"dc=$dcall\"/;
+ s/suffix.*/suffix\t"dc=$dcall"/;
} $LDAPCONF;
} else {
- append_to_file($LDAPCONF, "suffix\t\"dc=$dcall\"");
+ append_to_file($LDAPCONF, qq(suffix\t"dc=$dcall"));
}
# s/example/$dcall
@@ -229,10 +229,10 @@ sub do_it_setldap {
# set rootdn
if (any { /^rootdn/ } cat_($LDAPCONF)) {
substInFile {
- s/rootdn.*/rootdn\t\"cn=$o->{var}{rootdn},dc=$dcall\"/;
+ s/rootdn.*/rootdn\t"cn=$o->{var}{rootdn},dc=$dcall"/;
} $LDAPCONF;
} else {
- append_to_file($LDAPCONF, "rootdn\t\"$o->{var}{rootdn},dc=$dcall\"");
+ append_to_file($LDAPCONF, qq(rootdn\t"$o->{var}{rootdn},dc=$dcall"));
}
# set rootpass
@@ -241,7 +241,7 @@ sub do_it_setldap {
substInFile {
s/rootpw.*/rootpw $cryptpass/;
} $LDAPCONF;
- }else {
+ } else {
append_to_file($LDAPCONF, "rootpw {CRYPT}$cryptpass");
}