From 76884f2dae8556d52be6c97e66a3171a94ef8420 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Mon, 3 Oct 2005 11:20:46 +0000 Subject: * (trunk/) doc/smokeping_install.pod, lib/Smokeping.pm, CHANGES: + make it work (hopefully) with even older versions of CGI::Carp if 'changecgiprogramname' is set to 'no' in the General section --- lib/Smokeping.pm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'lib/Smokeping.pm') diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 56b966c..dd2df9e 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -1608,7 +1608,8 @@ DOC _vars => [ qw(owner imgcache imgurl datadir dyndir pagedir piddir sendmail offset smokemail cgiurl mailhost contact netsnpp - syslogfacility syslogpriority concurrentprobes changeprocessnames tmail) ], + syslogfacility syslogpriority concurrentprobes changeprocessnames tmail + changecgiprogramname) ], _mandatory => [ qw(owner imgcache imgurl datadir piddir smokemail cgiurl contact) ], @@ -1777,6 +1778,19 @@ If 'concurrentprobes' is not set to 'yes', this variable has no effect. DOC _default => 'yes', }, + changecgiprogramname => { + _re => '(yes|no)', + _re_error =>"this must either be 'yes' or 'no'", + _doc => < for details. +DOC, + _default => 'yes', + }, tmail => { %$FILECHECK_SUB, @@ -2472,10 +2486,13 @@ sub daemonize_me ($) { sub initialize_cgilog (){ $use_cgilog = 1; + $logging=1; + return if $cfg->{General}{changecgiprogramname} eq 'no'; # set_progname() is available starting with CGI.pm-2.82 / Perl 5.8.1 # so trap this inside 'eval' + # even this apparently isn't enough for older versions that try to + # find out whether they are inside an eval...oh well. eval 'CGI::Carp::set_progname($0 . " [client " . ($ENV{REMOTE_ADDR}||"(unknown)") . "]")'; - $logging=1; } sub initialize_filelog ($){ -- cgit v1.2.3-24-g4f1b