diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-09-04 13:12:22 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-09-04 13:12:22 +0200 |
commit | 5b60728992b8990bd3e2e60feae35b6e07c30ada (patch) | |
tree | 9687ef2c0447ad9b9d95b4c3fd8d8b30b926c429 /src/op_mode | |
parent | 9a95a7b4e3bf3d34be6f3ba866fa59b90f49fcbf (diff) | |
download | vyos-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-x | src/op_mode/show_acceleration.py | 12 |
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) |