[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82

Michael 'Mickey' Lauer mickey at vanille-media.de
Mon Feb 2 18:51:52 UTC 2009


The following commit has been merged in the master branch:
commit 59855d9afbcf60f19b31042bfd95528b8f165419
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date:   Fri Jan 9 16:12:03 2009 +0100

    odeviced: powercontrol_neo: use wmiconfig to enable/disable wlan0

diff --git a/framework/subsystems/odeviced/powercontrol_neo.py b/framework/subsystems/odeviced/powercontrol_neo.py
index 1d91d85..44f7fc4 100644
--- a/framework/subsystems/odeviced/powercontrol_neo.py
+++ b/framework/subsystems/odeviced/powercontrol_neo.py
@@ -11,12 +11,12 @@ Module: powercontrol_neo
 """
 
 MODULE_NAME = "odeviced.powercontrol_neo"
-__version__ = "0.7.2"
+__version__ = "0.7.3"
 
 from helpers import readFromFile, writeToFile
 from powercontrol import GenericPowerControl, ResourceAwarePowerControl
 
-import os, sys
+import os, subprocess, sys
 
 import logging
 logger = logging.getLogger( MODULE_NAME )
@@ -71,7 +71,12 @@ class NeoWifiPowerControl( ResourceAwarePowerControl ):
         ResourceAwarePowerControl.__init__( self, bus, "WiFi", node )
 
     def setPower( self, power ):
-        wireless.wifiSetOn( "eth0", 1 if power else 0 )
+        if power:
+            subprocess.call( "wmiconfig -i eth0 --wlan enable".split() )
+            wireless.wifiSetOn( "eth0", 1 )
+        else:
+            wireless.wifiSetOn( "eth0", 0 )
+            subprocess.call( "wmiconfig -i eth0 --wlan disable".split() )
 
     def getPower( self ):
         return wireless.wifiIsOn( "eth0" )

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list