From 28bb302b5fdbf99deee2e54d822236aa2021a4ac Mon Sep 17 00:00:00 2001 From: Krzysztof Majzerowicz-Jaszcz Date: Fri, 26 Aug 2022 11:24:31 +0200 Subject: [PATCH] RHEL 8.5 workaround - version check fix Fix the version check for the RHEL8.5 workaround Signed-off-by: Krzysztof Majzerowicz-Jaszcz --- .../1_blk_queue_exit_workaround_for_rhel.conf | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/configure.d/1_blk_queue_exit_workaround_for_rhel.conf b/configure.d/1_blk_queue_exit_workaround_for_rhel.conf index 657d9f0..e557613 100644 --- a/configure.d/1_blk_queue_exit_workaround_for_rhel.conf +++ b/configure.d/1_blk_queue_exit_workaround_for_rhel.conf @@ -37,17 +37,29 @@ check () { #check kernel and rhel version (major/minor/sub) if [ "$LINUX_MAJOR" -eq "$QUEUE_PUT_WA_LINUX_MAJOR_SINCE" ] && [ "$LINUX_MINOR" -eq "$QUEUE_PUT_WA_LINUX_MINOR_SINCE" ] && - [ "$LINUX_SUB" -eq "$QUEUE_PUT_WA_LINUX_SUB_SINCE" ] && - [ "$RHEL_MAJOR" -ge "$QUEUE_PUT_WA_RHEL_MAJOR_SINCE" ] && - [ "$RHEL_MINOR" -ge "$QUEUE_PUT_WA_RHEL_MINOR_SINCE" ] && - [ "$RHEL_SUB" -ge "$QUEUE_PUT_WA_RHEL_SUB_SINCE" ] + [ "$LINUX_SUB" -eq "$QUEUE_PUT_WA_LINUX_SUB_SINCE" ]; then - echo $cur_name "1" >> $config_file_path; #workaround needed + if [ "$RHEL_MAJOR" -gt "$QUEUE_PUT_WA_RHEL_MAJOR_SINCE" ]; then + echo $cur_name "1" >> $config_file_path; #workaround needed + elif [ "$RHEL_MAJOR" -lt "$QUEUE_PUT_WA_RHEL_MAJOR_SINCE" ]; then + echo $cur_name "2" >> $config_file_path; #no workaround needed + else + if [ "$RHEL_MINOR" -gt "$QUEUE_PUT_WA_RHEL_MINOR_SINCE" ]; then + echo $cur_name "1" >> $config_file_path; #workaround needed + elif [ "$RHEL_MINOR" -lt "$QUEUE_PUT_WA_RHEL_MINOR_SINCE" ]; then + echo $cur_name "2" >> $config_file_path; #no workaround needed + else + if [ "$RHEL_SUB" -ge "$QUEUE_PUT_WA_RHEL_SUB_SINCE" ]; then + echo $cur_name "1" >> $config_file_path; #workaround needed + else + echo $cur_name "2" >> $config_file_path; #no workaround needed + fi + fi + fi else echo $cur_name "2" >> $config_file_path; #no workaround needed fi fi - } apply() {