diff options
author | hagbard <vyosdev@derith.de> | 2019-02-19 12:36:31 -0800 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2019-02-28 14:53:03 +0100 |
commit | e95f526a6e517e68346dcf65eb27399190971f76 (patch) | |
tree | ba358f2186c132192be1bae4d565bbd822600c9c /src/op_mode | |
parent | b8f9ecfafd36c22e80a6d47e24c4b21ac5ed63f9 (diff) | |
download | vyos-1x-e95f526a6e517e68346dcf65eb27399190971f76.tar.gz vyos-1x-e95f526a6e517e68346dcf65eb27399190971f76.zip |
fixes: T1254 - generate wireguard keypair fails when executed on the iso
- keypair can now be generated and used from the running iso to create wg tunnels on the fly
Conflicts:
debian/changelog
Diffstat (limited to 'src/op_mode')
-rwxr-xr-x | src/op_mode/wireguard.py | 6 |
1 files changed, 5 insertions, 1 deletions
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) |