Code

- Added patch from LHM commit r15601 Closes: #849
authoropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 27 Mar 2010 09:36:05 +0000 (09:36 +0000)
committeropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sat, 27 Mar 2010 09:36:05 +0000 (09:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17303 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/client/events/corefunctions.pm

index 1b387e5fea97281c591a65afd510c36d49c30f84..f1a8935cc128c6c4bc9ef4bda18c42e159e2b905 100644 (file)
@@ -22,7 +22,7 @@ use Fcntl;
 use GOSA::GosaSupportDaemon;
 use File::Basename;
 
-my ($ldap_enabled, $offline_enabled, $ldap_config, $pam_config, $nss_config, $fai_logpath);
+my ($ldap_enabled, $offline_enabled, $ldap_config, $pam_config, $nss_config, $fai_logpath, $ldap_config_exit_hook);
 
 my $chrony_file = "/etc/chrony/chrony.conf";
 my $syslog_file = "/etc/syslog.conf";
@@ -35,6 +35,7 @@ my %cfg_defaults = (
                "pam-config" => [\$pam_config, "/etc/pam_ldap.conf"],
                "nss-config" => [\$nss_config, "/etc/libnss-ldap.conf"],
                "fai-logpath" => [\$fai_logpath, "/var/log/fai/fai.log"],
+               "ldap-config-exit-hook" => [\$ldap_config_exit_hook, undef],
        },
 );
 
@@ -447,6 +448,12 @@ sub new_ldap_config {
        chown(0, 0, $cfg_name);
        chmod(0644, $cfg_name);
 
+    # Allow custom scripts to be executed
+    if (defined $ldap_config_exit_hook) {
+        system($ldap_config_exit_hook);
+        daemon_log("executed hook $ldap_config_exit_hook", 5);
+    }
+
     return;
 }