From 9a95a7b4e3bf3d34be6f3ba866fa59b90f49fcbf Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 4 Sep 2020 07:19:12 +0200 Subject: qat: T2853: fix path to init script from Intel source tarball --- src/conf_mode/intel_qat.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conf_mode/intel_qat.py b/src/conf_mode/intel_qat.py index a1abd5e81..ee3d68ebe 100755 --- a/src/conf_mode/intel_qat.py +++ b/src/conf_mode/intel_qat.py @@ -27,6 +27,8 @@ from vyos import ConfigError # Define for recovering gl_ipsec_conf = None +qat_init_script = '/etc/init.d/qat_service' + def get_config(): c = Config() config_data = { @@ -59,7 +61,7 @@ def vpn_control(action): def verify(c): # Check if QAT service installed - if not os.path.exists('/etc/init.d/vyos-qat-utilities'): + if not os.path.exists(qat_init_script): raise ConfigError("Warning: QAT init file not found") if c['qat_conf'] == None: @@ -82,7 +84,7 @@ def apply(c): # Disable QAT service if c['qat_conf'] == None: - ret = subprocess.Popen(['sudo', '/etc/init.d/vyos-qat-utilities', 'stop'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + ret = subprocess.Popen(['sudo', qat_init_script, 'stop'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (output, err) = ret.communicate() if c['ipsec_conf']: vpn_control('start') @@ -90,7 +92,7 @@ def apply(c): return # Run qat init.d script - ret = subprocess.Popen(['sudo', '/etc/init.d/vyos-qat-utilities', 'start'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + ret = subprocess.Popen(['sudo', qat_init_script, 'start'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (output, err) = ret.communicate() if c['ipsec_conf']: -- cgit v1.2.3