steffen: server/kolabd/kolabd kolabquotawarn.in,1.3,1.4

cvs at intevation.de cvs at intevation.de
Fri Sep 30 14:44:19 CEST 2005


Author: steffen

Update of /kolabrepository/server/kolabd/kolabd
In directory doto:/tmp/cvs-serv29890/kolabd

Modified Files:
	kolabquotawarn.in 
Log Message:
Forwardport of: Fix for Issue921 (uninitialised warnpct in quotawarn)

Index: kolabquotawarn.in
===================================================================
RCS file: /kolabrepository/server/kolabd/kolabd/kolabquotawarn.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- kolabquotawarn.in	15 Sep 2005 10:47:26 -0000	1.3
+++ kolabquotawarn.in	30 Sep 2005 12:44:16 -0000	1.4
@@ -83,7 +83,8 @@
 #
 sub fatal_exit {
     my($first) = shift(@_);
-    #printf( STDERR "fatal: $first", @_ );
+    printf( STDERR "fatal: $first", @_ );
+    printf( STDERR "\n" );
     mylog("err", "fatal: $first", @_);
     exit 1;
 }
@@ -93,6 +94,10 @@
 my $warninterval = 60*60*24; # seconds between warnings
 my $warnmessage = '';
 my $quotawarnpct = $Kolab::config{'cyrus-quotawarn'};
+fatal_exit( "Can't read configuration, please make sure that kolabquotawarn runs with sufficient privileges")
+  unless $quotawarnpct
+  && $Kolab::config{'cyrus_admin'}
+  && $Kolab::config{'cyrus_admin_pw'};
 my %quotawarn_db;
 my $warnh = new IO::File "< @sysconfdir@/kolab/quotawarning.txt";
 if( defined($warnh) ) {





More information about the commits mailing list