* fixes: value from config was not taken
This commit is contained in:
parent
1bce8e6b4d
commit
fd00cf0d83
1 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue