steffen: server/perl-kolab/Kolab-Util Util.pm,1.1,1.2
cvs at intevation.de
cvs at intevation.de
Wed Dec 22 14:50:17 CET 2004
Author: steffen
Update of /kolabrepository/server/perl-kolab/Kolab-Util
In directory doto:/tmp/cvs-serv31484/Kolab-Util
Modified Files:
Util.pm
Log Message:
moved superlog to Util and made bootstrap and kolabpasswd chown kolab.conf to kolab
Index: Util.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab-Util/Util.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Util.pm 31 Mar 2004 15:36:52 -0000 1.1
+++ Util.pm 22 Dec 2004 13:50:15 -0000 1.2
@@ -3,7 +3,7 @@
##
## Copyright (c) 2003 Code Fusion cc
##
-## Writen by Stuart Bingë <s.binge at codefusion.co.za>
+## Writen by Stuart Bing?<s.binge at codefusion.co.za>
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
@@ -23,6 +23,7 @@
use strict;
use warnings;
use IO::File;
+use Sys::Syslog;
require Exporter;
@@ -41,6 +42,7 @@
&ldapDateToEpoch
&readConfig
&readList
+ &superLog
);
our $VERSION = '0.9';
@@ -67,6 +69,13 @@
return timelocal($se, $mi, $h, $d, $m, $y);
}
+sub superLog
+{
+ my $text = shift;
+ #print STDERR "$text\n";
+ syslog('info', "$text");
+}
+
sub readConfig
{
my $ref = shift;
@@ -85,7 +94,10 @@
$sep = '\s' if ($sep eq ' ' || $sep eq '#');
my $fd;
- if (!($fd = IO::File->new($file, 'r'))) { return %cfg; }
+ if (!($fd = IO::File->new($file, 'r'))) {
+ superLog( "Warning: Could not read $file");
+ return %cfg;
+ }
foreach (<$fd>) {
if (/^([^$sep#]+)$sep+([^#]*)/) {
@@ -131,7 +143,7 @@
=head1 AUTHOR
-Stuart Bingë, E<lt>s.binge at codefusion.co.zaE<gt>
+Stuart Bingë¬ E<lt>s.binge at codefusion.co.zaE<gt>
=head1 COPYRIGHT AND LICENSE
More information about the commits
mailing list