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