system and splash: add ignore inhibitors to reboot and shutdown

This commit is contained in:
alfrix 2023-08-10 00:05:23 -03:00 committed by Alfredo Monclus
parent 4800b56492
commit 35007af482
2 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ class Panel(ScreenPanel):
"machine.shutdown")
else:
logging.info("OS Shutdown")
os.system("systemctl poweroff")
os.system("systemctl poweroff -i")
def restart_system(self, widget):
@ -126,7 +126,7 @@ class Panel(ScreenPanel):
"machine.reboot")
else:
logging.info("OS Reboot")
os.system("systemctl reboot")
os.system("systemctl reboot -i")
def retry(self, widget):
self.update_text((_("Connecting to %s") % self._screen.connecting_to_printer))

View File

@ -334,9 +334,9 @@ class Panel(ScreenPanel):
self._gtk.remove_dialog(dialog)
if response_id == Gtk.ResponseType.OK:
if method == "reboot":
os.system("systemctl reboot")
os.system("systemctl reboot -i")
else:
os.system("systemctl poweroff")
os.system("systemctl poweroff -i")
elif response_id == Gtk.ResponseType.APPLY:
if method == "reboot":
self._screen._ws.send_method("machine.reboot")