Article View: news.software.nntp
Article #79694Re: cnfsstat not writing to syslog
From: Julien ÉLIE
Date: Wed, 19 Nov 2008 15:08
Date: Wed, 19 Nov 2008 15:08
57 lines
3205 bytes
3205 bytes
Hi Bruce,
> We're setting up a new box using Solaris 10 (x86 current u6 release) with
> perl 5.8.4, inn 2.4.5 and using cnfs for the storage.
>
> Running it manually is fine, prints to console the correct info. On the old
> server, doing cnfsstat -s from the command line dumps the output into
> news.notice.
>
> Doing that on the new box, does not.
The code is there in <pathbin>/cnfsstat:
if ($opt_s) {
$use_syslog = 0;
## Comment out this eval line if you don't want to try to syslog
eval { require Sys::Syslog; import Sys::Syslog; $use_syslog = 1 };
if ($use_syslog) {
if (defined &Sys::Syslog::setlogsock && $] >= 5.00403) {
# we really need a common module to work all this junk out
if ($OSNAME eq "dec_osf") {
sub Sys::Syslog::_PATH_LOG { "/dev/log" }
}
Sys::Syslog::setlogsock('unix')
if $OSNAME =~ /linux|freebsd|dec_osf|darwin/;
}
openlog ('cnfsstat', 'pid', $inn::syslog_facility);
} else {
print STDERR "Syslog is not available. -s option is ignored.\n";
}
}
Maybe you could try to change this code to:
my $use_syslog = 0;
if ($opt_s) {
eval { require Sys::Syslog; import Sys::Syslog; $use_syslog = 1; };
if ($use_syslog) {
eval "sub Sys::Syslog::_PATH_LOG { '/dev/log' }" if $^O eq 'dec_osf';
Sys::Syslog::setlogsock('unix') if $^O =~ /linux|dec_osf|freebsd|darwin/;
openlog('cnfsstat', 'pid', $inn::syslog_facility);
} else {
print STDERR "Syslog is not available. -s option is ignored.\n";
}
}
Please tell me if it is better.
--
Julien ÉLIE
« A man inserted an 'ad' in the classifieds: "Wife wanted".
Next day he received a hundred letters. They all said
the same thing: "You can have mine." »
Technical Details
Message-ID:
<gg1a5j$4uh$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news.trigofacile.com!not-for-mailReferences:
<gg166a$7v9$1@e250.ripco.com>Show Full Headers
Complete Article Headers
Message-ID: <gg1a5j$4uh$1@news.trigofacile.com> Subject: Re: cnfsstat not writing to syslog Date: Wed, 19 Nov 2008 16:08:20 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <gg166a$7v9$1@e250.ripco.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news.trigofacile.com!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 57 NNTP-Posting-Host: amontpellier-152-1-63-13.w83-197.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1227107315 5073 83.197.150.13 (19 Nov 2008 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Wed, 19 Nov 2008 15:08:35 +0000 (UTC) In-Reply-To: <gg166a$7v9$1@e250.ripco.com> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049 X-Original-Bytes: 3019