From 4188b0f49a88b9881f2a95bc5863270163dcac80 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 31 Jan 2021 11:50:10 +0000 Subject: Testsuite: use buildin commands over 'openvpn --genkey' raw command --- scripts/check-qemu-install | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts/check-qemu-install') 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}') -- cgit v1.2.3