richard: server/perl-kolab/lib/Kolab Conf.pm,1.10,1.11
cvs at kolab.org
cvs at kolab.org
Tue Nov 24 19:45:00 CET 2009
Author: richard
Update of /kolabrepository/server/perl-kolab/lib/Kolab
In directory doto:/tmp/cvs-serv14677/lib/Kolab
Modified Files:
Conf.pm
Log Message:
Renamed variable do_reload to $Kolab::do_reload, to make it a global variable.
This is needed to solve kolab/issue3951: kolabconf -n (noreload) restarts
services if RUNONCHANGE is used
Index: Conf.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/lib/Kolab/Conf.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Conf.pm 7 May 2009 16:13:33 -0000 1.10
+++ Conf.pm 24 Nov 2009 18:44:58 -0000 1.11
@@ -741,8 +741,18 @@
}
my $cmd;
foreach $cmd (keys %cmds) {
- Kolab::log('T', 'Executing command: '.$cmd, KOLAB_DEBUG );
- system($cmd);
+ # $cmd can contain:
+ # - /usr/sbin/postmap: should always be executed
+ # - openpkg rc imapd restart (in openpkg distribution)
+ # - kolabsrv rc post reload (in other distributions)
+ # The commands with ' rc ' may only be executed when reloading is not
+ # prohibited by the user with the "-n" option.
+ if ($Kolab::do_reload || $cmd !~ / rc \S+ re(start|load)/) {
+ Kolab::log('T', 'Executing command: '.$cmd, KOLAB_DEBUG );
+ system($cmd);
+ } else {
+ Kolab::log('T', 'Reload not allowed, not executing command: '.$cmd, KOLAB_DEBUG );
+ }
}
}
More information about the commits
mailing list