From fc8a54a40645412e9c738723e54159bfda40cfde Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 6 Sep 2012 04:18:27 +0900 Subject: openvpn management socket is a temp path on each run --- src/leap/eip/openvpnconnection.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/leap/eip/openvpnconnection.py') diff --git a/src/leap/eip/openvpnconnection.py b/src/leap/eip/openvpnconnection.py index ec8b48bf..2ab0622e 100644 --- a/src/leap/eip/openvpnconnection.py +++ b/src/leap/eip/openvpnconnection.py @@ -26,12 +26,10 @@ class OpenVPNConnection(Connection): def __init__(self, config_file=None, watcher_cb=None, debug=False, - host="/tmp/.eip.sock", + host=None, port="unix", password=None, *args, **kwargs): - #XXX FIXME - #change watcher_cb to line_observer """ :param config_file: configuration file to read from :param watcher_cb: callback to be \ @@ -42,8 +40,12 @@ to be triggered for each one of them. :type watcher_cb: function :type signal_map: dict """ + #XXX FIXME + #change watcher_cb to line_observer + logger.debug('init openvpn connection') self.debug = debug + # XXX if not host: raise ImproperlyConfigured self.config_file = config_file self.watcher_cb = watcher_cb @@ -103,7 +105,8 @@ to be triggered for each one of them. # XXX check also for command-line --command flag try: command, args = eip_config.build_ovpn_command( - debug=self.debug) + debug=self.debug, + socket_path=self.host) except eip_exceptions.EIPNoPolkitAuthAgentAvailable: command = args = None # XXX deprecate -- cgit v1.2.3