fixed var

- Diese und die folgenden Zeilen werden ignoriert --

M    pythonrewrite/plugins/network/network.py
M    pythonrewrite/plugins/network/root_action.py
This commit is contained in:
age 2006-11-04 14:37:17 +00:00
parent 514101193d
commit ec2b713836
2 changed files with 2 additions and 0 deletions

View file

@ -85,6 +85,7 @@ class network(CryptoBoxPlugin.CryptoBoxPlugin):
root_action_plug.IFCONFIG_BIN, root_action_plug.IFCONFIG_BIN,
root_action_plug.IFACE]) root_action_plug.IFACE])
proc.wait() proc.wait()
(output, error) = proc.communicate()
if proc.returncode != 0: return (0,0,0,0) if proc.returncode != 0: return (0,0,0,0)
## this regex matches the four numbers of the IP ## this regex matches the four numbers of the IP
match = re.search(u'inet [\w]+:(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\s',output) match = re.search(u'inet [\w]+:(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\s',output)

View file

@ -6,6 +6,7 @@
PLUGIN_TYPE = "cryptobox" PLUGIN_TYPE = "cryptobox"
IFCONFIG_BIN = "/sbin/ifconfig" IFCONFIG_BIN = "/sbin/ifconfig"
#TODO: put IFACE in config
IFACE = "eth0" IFACE = "eth0"
import subprocess import subprocess