summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rwxr-xr-xsrc/op_mode/wireguard.py6
2 files changed, 11 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 87d51c8e7..52c64950c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vyos-1x (1.2.0-14) unstable; urgency=low
+
+ * fixes T1254 - generate wireguard keypair fails when executed on the iso
+ - keypair can now be generated and used from a running iso
+
+ -- hagbard <vyosdev@derith.de> Tue, 19 Feb 2019 12:31:50 -0800
vyos-1x (1.2.0-13) unstable; urgency=low
* fixes T1238 - Wireguard allows invalid IP's
diff --git a/src/op_mode/wireguard.py b/src/op_mode/wireguard.py
index 73da72aa7..66622c04c 100755
--- a/src/op_mode/wireguard.py
+++ b/src/op_mode/wireguard.py
@@ -56,8 +56,12 @@ def genkey():
except KeyboardInterrupt:
sys.exit(0)
else:
+ """ if keypair is bing executed from a running iso """
if not os.path.exists(dir):
- os.mkdir(dir)
+ os.umask(old_umask)
+ subprocess.call(['sudo mkdir -p ' + dir], shell=True)
+ subprocess.call(['sudo chgrp vyattacfg ' + dir], shell=True)
+ subprocess.call(['sudo chmod 770 ' + dir], shell=True)
generate_keypair()
os.umask(old_umask)