From a5af3e83d695f9182e23600dd199ef719917b2e0 Mon Sep 17 00:00:00 2001 From: Turann_ Date: Sun, 15 Mar 2026 22:07:04 +0300 Subject: [PATCH] Guard ethtool usage. --- Services/Networking/NetworkService.qml | 5 ++++- Services/System/ProgramCheckerService.qml | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Services/Networking/NetworkService.qml b/Services/Networking/NetworkService.qml index 8261722b7..527fa9dfb 100644 --- a/Services/Networking/NetworkService.qml +++ b/Services/Networking/NetworkService.qml @@ -779,10 +779,13 @@ Singleton { root.activeEthernetDetails = details; root.activeEthernetDetailsTimestamp = Date.now(); root.ethernetDetailsLoading = false; - } else { + } else if (ProgramCheckerService.ethtoolAvailable) { // Fallback to ethtool if sysfs unreadable or invalid ethernetEthtoolProcess.ifname = ethernetSysfsSpeedProcess.ifname; ethernetEthtoolProcess.running = true; + } else { + root.activeEthernetDetailsTimestamp = Date.now(); + root.ethernetDetailsLoading = false; } } } diff --git a/Services/System/ProgramCheckerService.qml b/Services/System/ProgramCheckerService.qml index 7f50e88b8..ea2f6d0f4 100644 --- a/Services/System/ProgramCheckerService.qml +++ b/Services/System/ProgramCheckerService.qml @@ -17,6 +17,7 @@ Singleton { property bool gnomeCalendarAvailable: false property bool pythonAvailable: false property bool wtypeAvailable: false + property bool ethtoolAvailable: false // Programs to check - maps property names to commands readonly property var programsToCheck: ({ @@ -25,7 +26,8 @@ Singleton { "wlsunsetAvailable": ["sh", "-c", "command -v wlsunset"], "gnomeCalendarAvailable": ["sh", "-c", "command -v gnome-calendar"], "wtypeAvailable": ["sh", "-c", "command -v wtype"], - "pythonAvailable": ["sh", "-c", "command -v python3"] + "pythonAvailable": ["sh", "-c", "command -v python3"], + "ethtoolAvailable": ["sh", "-c", "command -v ethtool"] }) // Discord client auto-detection