From 8cac3cbc19a85f9d8d12986b456d60169789fb35 Mon Sep 17 00:00:00 2001 From: k-ronny <78017977+k-ronny@users.noreply.github.com> Date: Sun, 13 Mar 2022 18:14:24 +0200 Subject: [PATCH] luci-app-statistics: irq plugin: handle numeric interrupt names the `irq` plugin does not show the right data if the interrupt name is only numeric Signed-off-by: Ronny Kotzschmar (cherry picked from commit dc2570305383a1014b39b44471c0b8c491e23026) Fixes #5719 --- applications/luci-app-statistics/root/usr/bin/stat-genconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-statistics/root/usr/bin/stat-genconfig b/applications/luci-app-statistics/root/usr/bin/stat-genconfig index b03b547d48..fa59edc3a9 100755 --- a/applications/luci-app-statistics/root/usr/bin/stat-genconfig +++ b/applications/luci-app-statistics/root/usr/bin/stat-genconfig @@ -251,8 +251,8 @@ function _string( s, n, nopad ) if not nopad then pad = "\t" end if s then - if s:find("[^%d]") or n == "Port" then - if not s:find("[^%w]") and n ~= "Port" then + if s:find("[^%d]") or n == "Port" or n == "Irq" then + if not s:find("[^%w]") and n ~= "Port" and n ~= "Irq" then str = pad .. n .. " " .. luci.util.trim(s) else str = pad .. n .. ' "' .. luci.util.trim(s) .. '"' -- 2.30.2