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.
This commit is contained in:
1 file changed
-14
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user