From fd00cf0d832a4735d405481b2f082fe9921efdc8 Mon Sep 17 00:00:00 2001 From: age Date: Thu, 8 Feb 2007 07:44:06 +0000 Subject: [PATCH] * fixes: value from config was not taken --- plugins/network/network.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/network/network.py b/plugins/network/network.py index 434faaa..e666567 100644 --- a/plugins/network/network.py +++ b/plugins/network/network.py @@ -35,8 +35,7 @@ import cryptobox.plugins.base ## specify (in seconds), how long we should wait before redirecting and ip change REDIRECT_DELAY = 10 CHANGE_IP_DELAY = 5 -## default network interface (may be overriden by the "interface" setting of the -## network plugin in cryptobox.conf +## default network interface (if none is given via cryptobox.conf) DEFAULT_INTERFACE = "eth0" class network(cryptobox.plugins.base.CryptoBoxPlugin): @@ -331,9 +330,13 @@ class network(cryptobox.plugins.base.CryptoBoxPlugin): def __get_interface(self): """Return the name of the configured network interface """ - if "interface" in self.defaults: - return self.defaults["interface"] + #self.cbox.log.debug("network plugin default config:") + #self.cbox.log.debug(self.defaults) + if "interface" in self.defaults["network"]: + self.cbox.log.error(DEFAULT_INTERFACE) + return self.defaults["network"]["interface"] else: + self.cbox.log.error(DEFAULT_INTERFACE) return DEFAULT_INTERFACE