summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-04 13:12:22 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-04 13:12:22 +0200
commit5b60728992b8990bd3e2e60feae35b6e07c30ada (patch)
tree9687ef2c0447ad9b9d95b4c3fd8d8b30b926c429 /src/op_mode
parent9a95a7b4e3bf3d34be6f3ba866fa59b90f49fcbf (diff)
downloadvyos-1x-5b60728992b8990bd3e2e60feae35b6e07c30ada.tar.gz
vyos-1x-5b60728992b8990bd3e2e60feae35b6e07c30ada.zip
qat: T2853: fix op-mode path to Intel scripts
Ammendmend to commit 9a95a7b4e3bf ("qat: T2853: fix path to init script from Intel source tarball").
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/show_acceleration.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/op_mode/show_acceleration.py b/src/op_mode/show_acceleration.py
index 3ba0e85dd..1e020cea4 100755
--- a/src/op_mode/show_acceleration.py
+++ b/src/op_mode/show_acceleration.py
@@ -22,6 +22,8 @@ import argparse
import subprocess
from vyos.config import Config
+qat_init_script = '/etc/init.d/qat_service'
+
def detect_qat_dev():
ret = subprocess.Popen(['sudo', 'lspci', '-nn'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
(output, err) = ret.communicate()
@@ -37,16 +39,16 @@ def show_qat_status():
detect_qat_dev()
# Check QAT service
- if not os.path.exists('/etc/init.d/vyos-qat-utilities'):
+ if not os.path.exists(qat_init_script):
print("\t QAT service not installed")
sys.exit(1)
# Show QAT service
- os.system('sudo /etc/init.d/vyos-qat-utilities status')
+ os.system('sudo ' + qat_init_script)
# Return QAT devices
def get_qat_devices():
- ret = subprocess.Popen(['sudo', '/etc/init.d/vyos-qat-utilities', 'status'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ ret = subprocess.Popen(['sudo', qat_init_script, 'status'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
(output, err) = ret.communicate()
if not err:
#print(output)
@@ -58,7 +60,7 @@ def get_qat_devices():
def get_qat_proc_path(qat_dev):
q_type = ""
q_bsf = ""
- ret = subprocess.Popen(['sudo', '/etc/init.d/vyos-qat-utilities', 'status'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ ret = subprocess.Popen(['sudo', qat_init_script, 'status'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
(output, err) = ret.communicate()
if not err:
# Parse QAT service output
@@ -115,4 +117,4 @@ elif args.dev_list:
get_qat_devices()
else:
parser.print_help()
- sys.exit(1) \ No newline at end of file
+ sys.exit(1)