]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/pakfire.cgi
pakfire.cgi: Discard tac stderr output
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / pakfire.cgi
index 6fade81bd1f6b36033596990f73322bf98fe037b..489b07a6d58968f71844a5c2e5f0714d3f244a50 100644 (file)
@@ -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;