From da54ea206b908d0ab08f7e8c61466c5fe6180540 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Wed, 18 Oct 2006 00:12:07 +0000 Subject: workaround for not working /etc/init.d/network script --- lib/python/Components/Network.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/python/Components/Network.py') 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() -- cgit v1.2.3