X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9fabf78619c384aeabc9f6ac941918531200fbb5..abcc03fa546d408b9a858c0e1681deabfbdc3cd5:/lib/python/Components/Network.py diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py index 0493f0fa..f65863dc 100644 --- a/lib/python/Components/Network.py +++ b/lib/python/Components/Network.py @@ -80,9 +80,14 @@ class Network: except: print "[Network.py] parsing network failed" + def deactivateNetworkConfig(self): + 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()