From afde4af25ad50c19a642776f5c772ccbe918e26e Mon Sep 17 00:00:00 2001 From: lhm-gosa Date: Mon, 8 Feb 2010 13:00:50 +0000 Subject: [PATCH] Add option to execute custom scripts after LDAP config file generation (#4125). git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@15601 594d385d-05f5-0310-b6e9-bd551577e9d8 --- trunk/gosa-si/client/events/corefunctions.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/trunk/gosa-si/client/events/corefunctions.pm b/trunk/gosa-si/client/events/corefunctions.pm index d75c1006b..e640c87a7 100644 --- a/trunk/gosa-si/client/events/corefunctions.pm +++ b/trunk/gosa-si/client/events/corefunctions.pm @@ -23,7 +23,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"; @@ -36,6 +36,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], }, ); @@ -448,6 +449,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; } -- 2.30.2