summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-31 11:50:10 +0000
committerChristian Poessinger <christian@poessinger.com>2021-01-31 12:50:33 +0100
commitb5f7acf9cf5c1510d6168596b3ac080f04a6323b (patch)
treed5a79f0ad5a961571f3631a2416e4716d0e72d64 /scripts
parentfd2b3403b5b2e1c2b3b59f03568da36e5b0386e6 (diff)
downloadvyos-build-b5f7acf9cf5c1510d6168596b3ac080f04a6323b.tar.gz
vyos-build-b5f7acf9cf5c1510d6168596b3ac080f04a6323b.zip
Testsuite: use buildin commands over 'openvpn --genkey' raw command
(cherry picked from commit 4188b0f49a88b9881f2a95bc5863270163dcac80)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-qemu-install12
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index b28c000f..ead8ed10 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -371,10 +371,14 @@ try:
c.expect(r'vyos@vyos:~\$', timeout=600)
c.sendline(f'openssl dhparam -out {dh_pem} 2048')
c.expect(r'vyos@vyos:~\$', timeout=600)
- c.sendline(f'openvpn --genkey --secret {s2s_key}')
- c.expect(r'vyos@vyos:~\$', timeout=600)
- c.sendline(f'openvpn --genkey --secret {auth_key}')
- c.expect(r'vyos@vyos:~\$', timeout=600)
+ c.sendline(f'generate openvpn key {s2s_key}')
+ c.expect(r'vyos@vyos:~\$')
+ c.sendline(f'generate openvpn key {auth_key}')
+ c.expect(r'vyos@vyos:~\$')
+
+ script_file = '/config/scripts/vyos-foo-update.script'
+ c.sendline(f'echo "#!/bin/sh" > {script_file}; chmod 775 {script_file}')
+ c.expect(r'vyos@vyos:~\$')
for file in [ca_cert, ssl_cert, ssl_key, dh_pem, s2s_key, auth_key]:
c.sendline(f'sudo chown openvpn:openvpn {file}')