summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/linux/ogOperations.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/linux/ogOperations.py b/src/linux/ogOperations.py
index d6795b1..ba141d9 100644
--- a/src/linux/ogOperations.py
+++ b/src/linux/ogOperations.py
@@ -1,5 +1,11 @@
+import os
+import subprocess
+
def poweroff():
- print 'APAGADO'
+ if os.path.exists('/scripts/oginit'):
+ subprocess.call('source /opt/opengnsys/etc/preinit/loadenviron.sh; /opt/opengnsys/scripts/poweroff', shell=True)
+ else:
+ subprocess.call(['/sbin/poweroff'])
def reboot():
print 'REBOOT'