mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Guard ethtool usage.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user