live: use reboot --force --force to make a hard reboot in new live

this is a workaround for the new live system to make a hardware reboot
that allows UEFI to pick up, otherwise it performs a kernel reboot instead.
master
OpenGnSys Support Team 2024-10-24 17:44:50 +02:00
parent 07b4bc1fcd
commit 7874323d46
1 changed files with 4 additions and 1 deletions

View File

@ -362,13 +362,16 @@ class OgLiveOperations:
self._enable_wol(interface)
if shutil.which('reboot'):
busybox = ''
opts = ' --force --force'
elif shutil.which('busybox'):
busybox = 'busybox '
opts = ''
else:
logging.warning('No reboot binary found')
busybox = ''
opts = ''
cmd_reboot = shlex.split(f'{busybox}reboot')
cmd_reboot = shlex.split(f'{busybox}reboot{opts}')
self._shutdown(interface, cmd_reboot)
def reboot(self):