File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -786,18 +786,5 @@ pub fn run_maza(ctx: &ExecutionContext) -> Result<()> {
786786pub 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}
You can’t perform that action at this time.
0 commit comments