summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-04-14 19:19:29 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-04-14 19:19:29 (GMT)
commit758e6927e4b63a82aabd5bb3bb1176dcc5a7c402 (patch)
treeaa2cdaf0165f990afe7cf741e1f843df4339ba4b
parent33b02d6feb6659585a08a972c27c6b8aa738933d (diff)
downloadperl-Kolab-758e6927e4b63a82aabd5bb3bb1176dcc5a7c402.tar.gz
Introduce the handling of a new (boolean) setting 'auto_kolab_conf'.
-rw-r--r--lib/Kolab/LDAP/Backend/fds.pm4
-rw-r--r--lib/Kolab/LDAP/Backend/slurpd.pm11
-rw-r--r--lib/Kolab/LDAP/Backend/syncrepl.pm7
3 files changed, 15 insertions, 7 deletions
diff --git a/lib/Kolab/LDAP/Backend/fds.pm b/lib/Kolab/LDAP/Backend/fds.pm
index 9d35610..8daf873 100644
--- a/lib/Kolab/LDAP/Backend/fds.pm
+++ b/lib/Kolab/LDAP/Backend/fds.pm
@@ -110,7 +110,9 @@ FOO:
Kolab::log('FDS', "Calling Kolab::LDAP::sync", KOLAB_DEBUG);
Kolab::LDAP::sync;
- system($Kolab::config{'kolabconf_script'}) == 0 || Kolab::log('SD', "Failed to run kolabconf: $?", KOLAB_ERROR);
+ if ($Kolab::config{'auto_kolab_conf'}) {
+ system($Kolab::config{'kolabconf_script'}) == 0 || Kolab::log('SD', "Failed to run kolabconf: $?", KOLAB_ERROR);
+ }
Kolab::log('FDS', "Finished Kolab::LDAP::sync, sleeping for 5 seconds", KOLAB_DEBUG);
diff --git a/lib/Kolab/LDAP/Backend/slurpd.pm b/lib/Kolab/LDAP/Backend/slurpd.pm
index 26b83bb..d36c2bb 100644
--- a/lib/Kolab/LDAP/Backend/slurpd.pm
+++ b/lib/Kolab/LDAP/Backend/slurpd.pm
@@ -290,10 +290,13 @@ TRYCONNECT:
exit(0);
}
waitpid($kidpid, 0);
- Kolab::log('SD', "Running $Kolab::config{'kolabconf_script'}");
- system($Kolab::config{'kolabconf_script'}) == 0
- or Kolab::log('SD', "Failed to run $Kolab::config{'kolabconf_script'}: $?", KOLAB_ERROR);
- Kolab::log('SD', "$Kolab::config{'kolabconf_script'} complete");
+
+ if ($Kolab::config{'auto_kolab_conf'}) {
+ Kolab::log('SD', "Running $Kolab::config{'kolabconf_script'}");
+ system($Kolab::config{'kolabconf_script'}) == 0
+ or Kolab::log('SD', "Failed to run $Kolab::config{'kolabconf_script'}: $?", KOLAB_ERROR);
+ Kolab::log('SD', "$Kolab::config{'kolabconf_script'} complete");
+ }
}
}
diff --git a/lib/Kolab/LDAP/Backend/syncrepl.pm b/lib/Kolab/LDAP/Backend/syncrepl.pm
index 5283262..ee84d58 100644
--- a/lib/Kolab/LDAP/Backend/syncrepl.pm
+++ b/lib/Kolab/LDAP/Backend/syncrepl.pm
@@ -243,8 +243,11 @@ sub searchCallback {
Kolab::log('SYNCREPL', "Calling Kolab::LDAP::sync", KOLAB_DEBUG);
Kolab::LDAP::sync;
- system($Kolab::config{'kolabconf_script'}) == 0
- || Kolab::log('SD', "Failed to run kolabconf: $?", KOLAB_ERROR);
+
+ if ($Kolab::config{'auto_kolab_conf'}) {
+ system($Kolab::config{'kolabconf_script'}) == 0
+ || Kolab::log('SD', "Failed to run kolabconf: $?", KOLAB_ERROR);
+ }
Kolab::log('SYNCREPL', "Finished Kolab::LDAP::sync sleeping 1s", KOLAB_DEBUG);
sleep 1; # we get too many bogus change notifications!