mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
qat, initcontainer: Improve the logic of config check
The check_config function previously only considered the ServicesEnabled variable. Improve the logic of the function so that other variables can also be set through the qat.conf file. Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
This commit is contained in:
parent
b505897d8c
commit
4d26e9517c
@ -12,8 +12,8 @@ SERVICES_ENABLED="NONE"
|
|||||||
SERVICES_ENABLED_FOUND="FALSE"
|
SERVICES_ENABLED_FOUND="FALSE"
|
||||||
|
|
||||||
check_config() {
|
check_config() {
|
||||||
[ -f "conf/qat.conf" ] && SERVICES_ENABLED=$(cut -d= -f 2 conf/qat.conf | grep '\S')
|
[ -f "conf/qat.conf" ] && SERVICES_ENABLED=$(grep "^ServicesEnabled=" conf/qat.conf | cut -d= -f 2 | grep '\S')
|
||||||
[ -f "conf/qat-$NODE_NAME.conf" ] && SERVICES_ENABLED=$(cut -d= -f 2 conf/qat-$NODE_NAME.conf | grep '\S')
|
[ -f "conf/qat-$NODE_NAME.conf" ] && SERVICES_ENABLED=$(grep "^ServicesEnabled=" conf/qat-"$NODE_NAME".conf | cut -d= -f 2 | grep '\S')
|
||||||
|
|
||||||
if [ "$SERVICES_ENABLED" != "NONE" ]; then
|
if [ "$SERVICES_ENABLED" != "NONE" ]; then
|
||||||
SERVICES_ENABLED_FOUND="FALSE"
|
SERVICES_ENABLED_FOUND="FALSE"
|
||||||
|
Loading…
Reference in New Issue
Block a user