Skip to content

Commit b678a8a

Browse files
qat, initcontaniner: imporve the logic of config check
check_config function used to consider ServicesEnabled variable. Improve the logic of the function so other variables could be also set through the qat.conf file Signed-off-by: Hyeongju Johannes Lee <[email protected]>
1 parent b505897 commit b678a8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demo/qat-init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ SERVICES_ENABLED="NONE"
1212
SERVICES_ENABLED_FOUND="FALSE"
1313

1414
check_config() {
15-
[ -f "conf/qat.conf" ] && SERVICES_ENABLED=$(cut -d= -f 2 conf/qat.conf | grep '\S')
16-
[ -f "conf/qat-$NODE_NAME.conf" ] && SERVICES_ENABLED=$(cut -d= -f 2 conf/qat-$NODE_NAME.conf | grep '\S')
15+
[ -f "conf/qat.conf" ] && SERVICES_ENABLED=$(grep "^ServicesEnabled=" conf/qat.conf | cut -d= -f 2 | grep '\S')
16+
[ -f "conf/qat-$NODE_NAME.conf" ] && SERVICES_ENABLED=$(grep "^ServicesEnabled=" conf/qat-"$NODE_NAME".conf | cut -d= -f 2 | grep '\S')
1717

1818
if [ "$SERVICES_ENABLED" != "NONE" ]; then
1919
SERVICES_ENABLED_FOUND="FALSE"

0 commit comments

Comments
 (0)