From patchwork Mon Sep 19 13:15:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6004 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4MWQCP30Ckz3wc4 for ; Mon, 19 Sep 2022 13:15:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4MWQCN271fz2Hm; Mon, 19 Sep 2022 13:15:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4MWQCN168Fz2yxm; Mon, 19 Sep 2022 13:15:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4MWQCL4mZVz2xGx for ; Mon, 19 Sep 2022 13:15:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4MWQCK600Gzqw; Mon, 19 Sep 2022 13:15:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1663593326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5EGZB59KYGbdRJhTtjDB1GW+aJNerSYohbsgrobLNY4=; b=OM4kjKkLmZjbP7dPlHsovxIiotPWFtO72GoJAC1vBzOsBwYm7cZhHJZhPAoflpjSPbqNgS IYBU61h6UsolPN29+6YjZqHSKDVdHzG/nX671L+0trTHvnLGI0BS3oc4ll2BMnRz8L3uiW /LHVNnkH6DhXW2+u6VWHDKrkfFG9taD1xPx2jn+p6dRCf6Sg50t8QrQtGnfTT7bZn76egV 5bW/UphbvK/GZ3mjlb0SdS99RqQCNwzLg7poIIjNjeOWEMyN3GgvmPZDZawHQNa+UrWHo0 4eumSvzDRUmZeU43JUIaypgvnG8cx/BdyEYKRwTpkcYlnZHO2CBzfXCDC7TNVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1663593326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5EGZB59KYGbdRJhTtjDB1GW+aJNerSYohbsgrobLNY4=; b=EK7nxq4UT8nxaNJdNQpNxMeuIpVHgYbWHgG+gHd9NdcntNnLv9juWsqZo17wWuARZ6hvnR 2vmVDUhEWifmg6Dw== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] log.dat: Add NUT entry for System Logs - Fixes bug#12921 Date: Mon, 19 Sep 2022 15:15:18 +0200 Message-Id: <20220919131518.2779-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Also aligned all the code entries in %sections and %trsections Suggested-by: Michael Tested-by: Michael Signed-off-by: Adolf Belka Reviewed-by: Bernhard Bitsch --- html/cgi-bin/logs.cgi/log.dat | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index 20f61d4ea..5fb1fcd5d 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -50,7 +50,7 @@ $cgiparams{'SECTION'} = 'ipfire'; my %sections = ( 'auth' => '(\w+\(pam_unix\)\[.*\]: )', - 'wio' => '(wio:|wio\[.*\])', + 'wio' => '(wio:|wio\[.*\])', 'captive' => '(Captive:)', 'clamav' => '(clamd\[.*\]: |freshclam\[.*\]: )', 'collectd' => '(collectd\[.*\]: )', @@ -65,11 +65,12 @@ my %sections = ( 'kernel' => '(kernel: (?!DROP_))', 'monit' => '(monit\[.*?\]: )', 'ntp' => '(ntpd(?:ate)?\[.*\]: )', - 'oinkmaster' => '(oinkmaster\[.*\]: )', + 'nut' => '(upsmon\[.*?\]: )', + 'oinkmaster' => '(oinkmaster\[.*\]: )', 'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )', 'pakfire' => '(pakfire:)', 'red' => '(red:|pppd\[.*\]: |chat\[.*\]|pppoe\[.*\]|pptp\[.*\]|pppoa\[.*\]|pppoa3\[.*\]|pppoeci\[.*\]|ipppd|ipppd\[.*\]|kernel: ippp\d|kernel: isdn.*|ibod\[.*\]|dhcpcd\[.*\]|modem_run\[.*\])', - 'samba' => '(nmbd|smbd|winbind)\[\d+\]:', + 'samba' => '(nmbd|smbd|winbind)\[\d+\]:', 'suricata' => '(suricata: )', 'squid' => '(squid\[.*\]: |squid: )', 'ssh' => '(sshd(?:\(.*\))?\[.*\]: )', @@ -81,7 +82,7 @@ my %sections = ( # Translations for the %sections array. my %trsections = ( 'auth' => "$Lang::tr{'loginlogout'}", - 'wio' => 'Who Is Online?', + 'wio' => 'Who Is Online?', 'captive' => $Lang::tr{'Captive'}, 'clamav' => 'ClamAV', 'collectd' => 'Collectd', @@ -96,11 +97,12 @@ my %trsections = ( 'kernel' => "$Lang::tr{'kernel'}", 'monit' => 'Monit', 'ntp' => 'NTP', - 'oinkmaster' => 'Oinkmaster', + 'nut' => 'NUT', + 'oinkmaster' => 'Oinkmaster', 'openvpn' => 'OpenVPN', 'pakfire' => 'Pakfire', 'red' => 'RED', - 'samba' => $Lang::tr{'samba'}, + 'samba' => $Lang::tr{'samba'}, 'suricata' => "$Lang::tr{'intrusion detection'}", 'squid' => "$Lang::tr{'web proxy'}", 'ssh' => 'SSH',