git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/bug_478_Listbox_ScrollbarMode' into experimental
[enigma2.git]
/
lib
/
python
/
Components
/
Network.py
diff --git
a/lib/python/Components/Network.py
b/lib/python/Components/Network.py
index f65d6090c3c8e699d901ab6778cd0ad97f2ee8a4..b9da48d8116c12b90ce1483141141c284cc05d1f 100755
(executable)
--- a/
lib/python/Components/Network.py
+++ b/
lib/python/Components/Network.py
@@
-14,7
+14,7
@@
class Network:
self.NetworkState = 0
self.DnsState = 0
self.nameservers = []
self.NetworkState = 0
self.DnsState = 0
self.nameservers = []
- self.ethtool_bin = "
/usr/sbin/
ethtool"
+ self.ethtool_bin = "ethtool"
self.container = eConsoleAppContainer()
self.Console = Console()
self.LinkConsole = Console()
self.container = eConsoleAppContainer()
self.Console = Console()
self.LinkConsole = Console()
@@
-24,6
+24,7
@@
class Network:
self.activateConsole = Console()
self.resetNetworkConsole = Console()
self.DnsConsole = Console()
self.activateConsole = Console()
self.resetNetworkConsole = Console()
self.DnsConsole = Console()
+ self.PingConsole = Console()
self.config_ready = None
self.getInterfaces()
self.config_ready = None
self.getInterfaces()
@@
-233,7
+234,7
@@
class Network:
self.configuredNetworkAdapters = self.configuredInterfaces
# load ns only once
self.loadNameserverConfig()
self.configuredNetworkAdapters = self.configuredInterfaces
# load ns only once
self.loadNameserverConfig()
- print "read configured interfac:", ifaces
+ print "read configured interfac
e
:", ifaces
print "self.ifaces after loading:", self.ifaces
self.config_ready = True
self.msgPlugins()
print "self.ifaces after loading:", self.ifaces
self.config_ready = True
self.msgPlugins()
@@
-424,6
+425,7
@@
class Network:
def checkNetworkState(self,statecallback):
# www.dream-multimedia-tv.de, www.heise.de, www.google.de
def checkNetworkState(self,statecallback):
# www.dream-multimedia-tv.de, www.heise.de, www.google.de
+ self.NetworkState = 0
cmd1 = "ping -c 1 82.149.226.170"
cmd2 = "ping -c 1 193.99.144.85"
cmd3 = "ping -c 1 209.85.135.103"
cmd1 = "ping -c 1 82.149.226.170"
cmd2 = "ping -c 1 193.99.144.85"
cmd3 = "ping -c 1 209.85.135.103"
@@
-475,10
+477,17
@@
class Network:
def getLinkStateFinished(self, result, retval,extra_args):
(callback) = extra_args
def getLinkStateFinished(self, result, retval,extra_args):
(callback) = extra_args
+
if self.LinkConsole is not None:
if len(self.LinkConsole.appContainers) == 0:
callback(result)
if self.LinkConsole is not None:
if len(self.LinkConsole.appContainers) == 0:
callback(result)
+ def stopPingConsole(self):
+ if self.PingConsole is not None:
+ if len(self.PingConsole.appContainers):
+ for name in self.PingConsole.appContainers.keys():
+ self.PingConsole.kill(name)
+
def stopLinkStateConsole(self):
if self.LinkConsole is not None:
if len(self.LinkConsole.appContainers):
def stopLinkStateConsole(self):
if self.LinkConsole is not None:
if len(self.LinkConsole.appContainers):
@@
-571,11
+580,11
@@
class Network:
self.wlanmodule = 'madwifi'
if os_path.exists(rt73_dir):
rtfiles = listdir(rt73_dir)
self.wlanmodule = 'madwifi'
if os_path.exists(rt73_dir):
rtfiles = listdir(rt73_dir)
- if len(rtfiles) == 2:
+ if len(rtfiles) == 2
or len(rtfiles) == 5
:
self.wlanmodule = 'ralink'
if os_path.exists(zd1211b_dir):
zdfiles = listdir(zd1211b_dir)
self.wlanmodule = 'ralink'
if os_path.exists(zd1211b_dir):
zdfiles = listdir(zd1211b_dir)
- if len(zdfiles) == 1:
+ if len(zdfiles) == 1
or len(zdfiles) == 5
:
self.wlanmodule = 'zydas'
return self.wlanmodule
self.wlanmodule = 'zydas'
return self.wlanmodule