diff --git a/fluent-package/yum/binstubs-test.sh b/fluent-package/yum/binstubs-test.sh index 00ce32bc4..d039d2067 100755 --- a/fluent-package/yum/binstubs-test.sh +++ b/fluent-package/yum/binstubs-test.sh @@ -14,8 +14,8 @@ if [ "$CI" = "true" ]; then echo "::group::Setup binstubs test" fi -distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f2) -version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f4) +distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f2) +version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f4) ENABLE_UPGRADE_TEST=1 case ${distribution} in diff --git a/fluent-package/yum/confluent-test.sh b/fluent-package/yum/confluent-test.sh index 690312d3d..8854b769c 100755 --- a/fluent-package/yum/confluent-test.sh +++ b/fluent-package/yum/confluent-test.sh @@ -13,8 +13,8 @@ fi # This means that column glitch exists. # So, we should remove before "o" character. -distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f2) -version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f4) +distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f2) +version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f4) case ${distribution} in amazon) diff --git a/fluent-package/yum/install-test.sh b/fluent-package/yum/install-test.sh index 0fed1ae5e..921f68386 100755 --- a/fluent-package/yum/install-test.sh +++ b/fluent-package/yum/install-test.sh @@ -11,8 +11,8 @@ set -exu # This means that column glitch exists. # So, we should remove before "o" character. -distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f2) -version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f4) +distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f2) +version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f4) ENABLE_UPGRADE_TEST=1 case ${distribution} in diff --git a/fluent-package/yum/serverspec-test.sh b/fluent-package/yum/serverspec-test.sh index e5141022f..b40463273 100755 --- a/fluent-package/yum/serverspec-test.sh +++ b/fluent-package/yum/serverspec-test.sh @@ -15,8 +15,8 @@ if [ "$CI" = "true" ]; then echo "::group::Setup serverspec test" fi -distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f2) -version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f4) +distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f2) +version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($0, "o"))}' | cut -d: -f4) case ${distribution} in amazon) diff --git a/fluent-package/yum/systemd-test/commonvar.sh b/fluent-package/yum/systemd-test/commonvar.sh index e056a2e47..9a847fd8a 100755 --- a/fluent-package/yum/systemd-test/commonvar.sh +++ b/fluent-package/yum/systemd-test/commonvar.sh @@ -1,7 +1,7 @@ #!/bin/bash -distribution=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f2) -version=$(cat /etc/system-release-cpe | awk '{print substr($0, index($1, "o"))}' | cut -d: -f4) +distribution=$(cat /etc/system-release-cpe | awk '{print substr($1, index($1, "o"))}' | cut -d: -f2) +version=$(cat /etc/system-release-cpe | awk '{print substr($1, index($1, "o"))}' | cut -d: -f4) td_agent_version=4.5.2 case $distribution in