Commit 72db605e authored by Joanne Hugé's avatar Joanne Hugé

WIP

parent fb39e73d
...@@ -27,14 +27,17 @@ class RunPromise(GenericPromise): ...@@ -27,14 +27,17 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists. In this case, check whether the file exists.
""" """
ifname = "{{ slap_configuration.get('tun-name', 'tun0') }}" ifname = "{{ slap_configuration.get('tun-name', '') }}"
# f = open('/sys/class/net/%s/operstate' % ifname, 'r') if ifname:
# if f.read() == 'up\n': f = open('/sys/class/net/%s/operstate' % ifname, 'r')
# self.logger.info("%s is up", ifname) if f.read() == 'up\n':
# else: self.logger.info("%s is up", ifname)
# self.logger.error("%s is down", ifname) else:
# f.close() self.logger.error("%s is down", ifname)
f.close()
self.logger.info("OK")
else:
self.logger.info("OK") self.logger.info("OK")
def test(self): def test(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment