Skip to content

Commit 0854f9c

Browse files
authored
revert: PR 866 (#927)
1 parent e4a068d commit 0854f9c

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/steps/os/unix.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -786,18 +786,5 @@ pub fn run_maza(ctx: &ExecutionContext) -> Result<()> {
786786
pub fn reboot() -> Result<()> {
787787
print!("{}", t!("Rebooting..."));
788788

789-
cfg_if::cfg_if! {
790-
if #[cfg(target_os = "linux")] {
791-
// Per this doc: https://www.freedesktop.org/software/systemd/man/latest/sd_booted.html
792-
//
793-
// If this directory exists, then this Linux uses systemd as the init program.
794-
let systemd_dir = Path::new("/run/systemd/system");
795-
if let Ok(true) = systemd_dir.try_exists() {
796-
// On Linux with systemd, `reboot` can be invoded without `sudo`.
797-
return Command::new("reboot").status_checked();
798-
}
799-
}
800-
}
801-
802789
Command::new("sudo").arg("reboot").status_checked()
803790
}

0 commit comments

Comments
 (0)