summaryrefslogtreecommitdiff
path: root/lib/Kolab/Conf.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kolab/Conf.pm')
-rw-r--r--lib/Kolab/Conf.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Kolab/Conf.pm b/lib/Kolab/Conf.pm
index 003d938..8ac43a7 100644
--- a/lib/Kolab/Conf.pm
+++ b/lib/Kolab/Conf.pm
@@ -137,6 +137,11 @@ sub build {
);
my $oldmask = umask 077;
+ #creating the config file is changing it
+ if (! -f $cfg) {
+ $templatehaschanged{$tmpl} = 1;
+ Kolab::log('T', "`$cfg' creation detected", KOLAB_DEBUG );
+ }
copy($cfg, $oldcfg);
#chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $oldcfg);
# To avoid warnings, the backup files must be owned by root
@@ -301,8 +306,8 @@ sub build {
#} elsif ($cfg =~ /example/) {
} else {
Kolab::log('T', "`$cfg' change detected ", KOLAB_DEBUG );
- $templatehaschanged{$tmpl} = 1;
}
+ $templatehaschanged{$tmpl} = 1;
Kolab::log('T', "`$cfg' change detected: $rc", KOLAB_DEBUG );
}
@@ -758,7 +763,7 @@ sub rebuildTemplates
foreach $key (keys %runonchange) {
if (defined $templatehaschanged{$key})
{
- Kolab::log('T', 'Actioning RUNONCHANGE for $key', KOLAB_DEBUG );
+ Kolab::log('T', 'Actioning RUNONCHANGE for '.$key, KOLAB_DEBUG );
my $cmd = $runonchange{$key};
system($cmd);
Kolab::log('T', 'Executing command', KOLAB_DEBUG );