[tuxdroid-svn] r5383 - in software_suite_v3/software/plugin: plugin-battery/trunk/executables plugi
Status: Beta
Brought to you by:
ks156
|
From: Gwadavel <c2m...@c2...> - 2009-09-14 23:59:22
|
Author: Gwadavel
Date: 2009-09-15 01:59:10 +0200 (Tue, 15 Sep 2009)
New Revision: 5383
Modified:
software_suite_v3/software/plugin/plugin-battery/trunk/executables/plugin-battery.py
software_suite_v3/software/plugin/plugin-charger/trunk/executables/plugin-charger.py
Log:
I made a mistake with startedBy
to know the server port, i use os.geteuid() 0 = root = port 270 else port = 54321
Modified: software_suite_v3/software/plugin/plugin-battery/trunk/executables/plugin-battery.py
===================================================================
--- software_suite_v3/software/plugin/plugin-battery/trunk/executables/plugin-battery.py 2009-09-14 15:26:39 UTC (rev 5382)
+++ software_suite_v3/software/plugin/plugin-battery/trunk/executables/plugin-battery.py 2009-09-14 23:59:10 UTC (rev 5383)
@@ -61,8 +61,8 @@
if "tgp_ip" in os.environ:
self.tgp_ip = os.environ["tgp_ip"]
- if "tgp_startedBy" in os.environ:
- if os.environ["tgp_startedBy"] == "user":
+ if os.name != "nt":
+ if os.geteuid() != 0:
self.tgp_port = 54321
if "tgp_port" in os.environ:
Modified: software_suite_v3/software/plugin/plugin-charger/trunk/executables/plugin-charger.py
===================================================================
--- software_suite_v3/software/plugin/plugin-charger/trunk/executables/plugin-charger.py 2009-09-14 15:26:39 UTC (rev 5382)
+++ software_suite_v3/software/plugin/plugin-charger/trunk/executables/plugin-charger.py 2009-09-14 23:59:10 UTC (rev 5383)
@@ -61,8 +61,8 @@
if "tgp_ip" in os.environ:
self.tgp_ip = os.environ["tgp_ip"]
- if "tgp_startedBy" in os.environ:
- if os.environ["tgp_startedBy"] == "user":
+ if os.name != "nt":
+ if os.geteuid() != 0:
self.tgp_port = 54321
if "tgp_port" in os.environ:
|