From dbbc7fa858f0d10321ad158afef94b8ffa0041bf Mon Sep 17 00:00:00 2001 From: Alvaro Neira Ayuso Date: Thu, 12 Dec 2019 18:51:15 +0100 Subject: 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. --- src/linux/ogOperations.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/linux') diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py index ba141d9..79bff19 100644 --- a/src/linux/ogOperations.py +++ b/src/linux/ogOperations.py @@ -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']) -- cgit v1.2.3-18-g5258