From 055fdcd50023fc182f8cc5487770e5c3d6886938 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 8 May 2026 22:07:49 +0545 Subject: [PATCH] refactor(src/utils): remove systemd-inhibit handling from rebuild_initramfsSimplify command construction by dropping unused inhibition logic. - New Features: - Enhancements: Simplified command construction in rebuild_initramfs. - Bug Fixes: Resolved potential error when systemd-inhibit is unavailable. --- src/utils/system.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/utils/system.rs b/src/utils/system.rs index f9b7ada..9ce96ab 100644 --- a/src/utils/system.rs +++ b/src/utils/system.rs @@ -148,20 +148,6 @@ pub fn rebuild_initramfs() { command = vec!["mkinitcpio", "-P"]; } - if let Ok(which) = Command::new("which").arg("systemd-inhibit").output() - && which.status.success() - { - let mut new_cmd = vec![ - "systemd-inhibit", - "--who=lapctl", - "--why", - "Rebuilding initramfs", - "--", - ]; - new_cmd.extend(command.iter()); - command = new_cmd; - } - if !command.is_empty() { println!("Rebuilding the initramfs..."); let is_debug = log::log_enabled!(log::Level::Debug);