From abf46748018663af75cd3907d24380425f7e25c2 Mon Sep 17 00:00:00 2001 From: TheAlexDev23 Date: Mon, 14 Oct 2024 11:49:59 +0200 Subject: [PATCH] Properly handle ifconfig absence in the daemon #26 --- crates/power-daemon/src/profile.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/power-daemon/src/profile.rs b/crates/power-daemon/src/profile.rs index c27a7cb..066bee7 100644 --- a/crates/power-daemon/src/profile.rs +++ b/crates/power-daemon/src/profile.rs @@ -616,6 +616,7 @@ impl NetworkSettings { fn toggle_all_ethernet_cards(disable: bool) { if !command_exists("ifconfig") { error!("ifconfig is not present in the system, ignoring ethernet settings..."); + return; } let entries = fs::read_dir("/sys/class/net").expect("Could not read sysfs path");