# HG changeset patch # User Michael Schloh von Bennewitz # Date 1240223690 -7200 # Node ID 7ed48a3146baa1d60bc696bf1427859e0e7402e7 # Parent 66c4ec7f657ebac0b1f0addaf4757125252ea7d7 Correct perl syntax and provide all four outputs to MRTG from scripts. diff -r 66c4ec7f657e -r 7ed48a3146ba mrtg/mrtg.spec --- a/mrtg/mrtg.spec Mon Apr 20 12:34:08 2009 +0200 +++ b/mrtg/mrtg.spec Mon Apr 20 12:34:50 2009 +0200 @@ -32,7 +32,7 @@ Group: Monitoring License: GPL Version: 2.16.2 -Release: 20090405 +Release: 20090418 # list of sources Source0: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz diff -r 66c4ec7f657e -r 7ed48a3146ba mrtg/uptime.pl --- a/mrtg/uptime.pl Mon Apr 20 12:34:08 2009 +0200 +++ b/mrtg/uptime.pl Mon Apr 20 12:34:50 2009 +0200 @@ -1,4 +1,4 @@ -#!@l_prefix@/bin/perl +#! @l_prefix@/bin/perl ## ## uptime.pl: provide formatted uptime(1) information ## diff -r 66c4ec7f657e -r 7ed48a3146ba mrtg/webstat.pl --- a/mrtg/webstat.pl Mon Apr 20 12:34:08 2009 +0200 +++ b/mrtg/webstat.pl Mon Apr 20 12:34:50 2009 +0200 @@ -1,4 +1,4 @@ -#!@l_prefix@/bin/perl +#! @l_prefix@/bin/perl ## ## webstats.pl: return HTTP server hits and bytes ## @@ -17,15 +17,17 @@ if ($res =~ /Server uptime: (.*)$/) { $up = $1;last } - else + else { next + } if ($res =~ /Server at/) { $server = $res; last } - else + else { next + } } @res = `@l_prefix@/bin/lynx -dump http://localhost/server-status?auto`; @@ -55,4 +57,6 @@ print "$up\n"; print "$server"; +print "$null\n"; +print "$null\n";