From dbda6abd2280f8e7cd7421a8c902d54b89ff02b5 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Mon, 19 Feb 2024 10:04:30 +0100 Subject: poweroff: always call poweroff_oglive and _reboot_oglive Remove leftover fallback to directly call utilities to poweroff and reboot. --- src/live/ogOperations.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index d538790..202a35b 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -225,17 +225,11 @@ class OgLiveOperations: def poweroff(self): logging.info('Powering off client') - if os.path.exists('/scripts/oginit'): - self._poweroff_oglive() - else: - subprocess.call(['/sbin/poweroff']) + self._poweroff_oglive() def reboot(self): logging.info('Rebooting client') - if os.path.exists('/scripts/oginit'): - self._poweroff_oglive(operation='reboot') - else: - subprocess.call(['/sbin/reboot']) + self._poweroff_oglive(operation='reboot') def shellrun(self, request, ogRest): cmd = request.getrun() -- cgit v1.2.3-18-g5258