diff options
Diffstat (limited to 'src/linux/ogOperations.py')
-rw-r--r-- | src/linux/ogOperations.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py index 79bff19..e3d69e2 100644 --- a/src/linux/ogOperations.py +++ b/src/linux/ogOperations.py @@ -1,14 +1,16 @@ import os import subprocess +OG_PATH = '/opt/opengnsys/' + def poweroff(): if os.path.exists('/scripts/oginit'): - subprocess.call('source /opt/opengnsys/etc/preinit/loadenviron.sh; /opt/opengnsys/scripts/poweroff', shell=True) + subprocess.call('source ' + OG_SCRIPT_PATH + 'etc/preinit/loadenviron.sh; ' + OG_SCRIPT_PATH + 'scripts/poweroff', shell=True) else: subprocess.call(['/sbin/poweroff']) def reboot(): if os.path.exists('/scripts/oginit'): - subprocess.call('source /opt/opengnsys/etc/preinit/loadenviron.sh; /opt/opengnsys/scripts/reboot', shell=True) + subprocess.call('source ' + OG_SCRIPT_PATH + 'etc/preinit/loadenviron.sh; ' + OG_SCRIPT_PATH + 'scripts/reboot', shell=True) else: subprocess.call(['/sbin/reboot']) |