Include the reboot support in ogOperation

This new patch allows us to reboot the linux machine using reboot binary or in
OpenGnsys client case, use the specific script.
more_events
Alvaro Neira Ayuso 2019-12-12 18:51:15 +01:00 committed by Alvaro Neira Ayuso
parent 62a8ca4cd8
commit dbbc7fa858
1 changed files with 4 additions and 2 deletions

View File

@ -8,5 +8,7 @@ def poweroff():
subprocess.call(['/sbin/poweroff'])
def reboot():
print 'REBOOT'
if os.path.exists('/scripts/oginit'):
subprocess.call('source /opt/opengnsys/etc/preinit/loadenviron.sh; /opt/opengnsys/scripts/reboot', shell=True)
else:
subprocess.call(['/sbin/reboot'])