mirror of https://git.48k.eu/ogclient
poweroff: always call poweroff_oglive and _reboot_oglive
Remove leftover fallback to directly call utilities to poweroff and reboot.master
parent
bcbbe26573
commit
dbda6abd22
|
|
@ -225,17 +225,11 @@ class OgLiveOperations:
|
||||||
|
|
||||||
def poweroff(self):
|
def poweroff(self):
|
||||||
logging.info('Powering off client')
|
logging.info('Powering off client')
|
||||||
if os.path.exists('/scripts/oginit'):
|
|
||||||
self._poweroff_oglive()
|
self._poweroff_oglive()
|
||||||
else:
|
|
||||||
subprocess.call(['/sbin/poweroff'])
|
|
||||||
|
|
||||||
def reboot(self):
|
def reboot(self):
|
||||||
logging.info('Rebooting client')
|
logging.info('Rebooting client')
|
||||||
if os.path.exists('/scripts/oginit'):
|
|
||||||
self._poweroff_oglive(operation='reboot')
|
self._poweroff_oglive(operation='reboot')
|
||||||
else:
|
|
||||||
subprocess.call(['/sbin/reboot'])
|
|
||||||
|
|
||||||
def shellrun(self, request, ogRest):
|
def shellrun(self, request, ogRest):
|
||||||
cmd = request.getrun()
|
cmd = request.getrun()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue