Acked-by: Peter Müller peter.muelle@ipfire.org
Prevents meaningless "broken pipe" messages in the httpd error log.
Signed-off-by: Leo-Andres Hofmann hofmann@leo-andres.de
html/cgi-bin/pakfire.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 6fade81bd..489b07a6d 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -75,7 +75,7 @@ if($cgiparams{'ACTION'} eq 'json-getstatus') {
# Read /var/log/messages backwards until a "Pakfire started" header is found, # to capture all messages of the last (i.e. current) Pakfire run
- my @messages = `tac /var/log/messages | sed -n '/pakfire:/{p;/Pakfire.*started/q}'`;
my @messages = `tac /var/log/messages 2>/dev/null | sed -n '/pakfire:/{p;/Pakfire.*started/q}'`;
# Test if the log contains an error message (fastest implementation, stops at first match) my $failure = any{ index($_, 'ERROR') != -1 } @messages;