diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-10-18 00:12:07 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-10-18 00:12:07 +0000 |
| commit | da54ea206b908d0ab08f7e8c61466c5fe6180540 (patch) | |
| tree | 9cfb2550d2ece88c5bc1a40f60a215a3448056df /lib/python | |
| parent | 948213ba7e5d1bc6a9c4d7f5f9d35c53186b60d3 (diff) | |
| download | enigma2-da54ea206b908d0ab08f7e8c61466c5fe6180540.tar.gz enigma2-da54ea206b908d0ab08f7e8c61466c5fe6180540.zip | |
workaround for not working /etc/init.d/network script
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/Network.py | 9 | ||||
| -rw-r--r-- | lib/python/Screens/NetworkSetup.py | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index 0493f0fa..5add0c01 100644 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -80,9 +80,16 @@ class Network: except: print "[Network.py] parsing network failed" + def deactivateNetworkConfig(self): + import os + os.system("ip addr flush eth0") + os.system("/etc/init.d/networking stop") + os.system("killall -9 udhcpc") + os.system("rm /var/run/udhcpc*") + def activateNetworkConfig(self): import os - os.system("/etc/init.d/networking restart") + os.system("/etc/init.d/networking start") config.network.ip.value = self.getCurrentIP() config.network.ip.save() diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py index 9ffae846..278c6606 100644 --- a/lib/python/Screens/NetworkSetup.py +++ b/lib/python/Screens/NetworkSetup.py @@ -51,6 +51,8 @@ class NetworkSetup(Screen, ConfigListScreen): def ok(self): #for x in self["config"].list: #x[1].save() + + iNetwork.deactivateNetworkConfig() iNetwork.writeNetworkConfig() iNetwork.activateNetworkConfig() self.close() |
