From 72433929118ea41925a7fc99edde8d1d249f4549 Mon Sep 17 00:00:00 2001 From: Dianjin Wang Date: Fri, 12 Dec 2025 16:15:05 +0800 Subject: [PATCH] Fix missing shebang in failover shell scripts Add shebang line to failover scripts to fix RPM build warnings. During RPM package build, rpmbuild reports warnings about executable files without shebang lines. This causes the build process to remove the executable bit from these scripts. The following scripts are fixed: - master_check_back.sh - standby_check_back.sh - segment_check_back.sh - segment_all_down.sh - docker_master_check_back.sh - docker_standby_check_back.sh - docker_segment_check_back.sh Use "#!/usr/bin/env bash" for better cross-platform compatibility. See: https://github.com/apache/cloudberry/issues/1445 --- src/bin/gpfts/failover/docker_master_check_back.sh | 1 + src/bin/gpfts/failover/docker_segment_check_back.sh | 2 +- src/bin/gpfts/failover/docker_standby_check_back.sh | 2 +- src/bin/gpfts/failover/master_check_back.sh | 1 + src/bin/gpfts/failover/segment_all_down.sh | 1 + src/bin/gpfts/failover/segment_check_back.sh | 1 + src/bin/gpfts/failover/standby_check_back.sh | 2 +- 7 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bin/gpfts/failover/docker_master_check_back.sh b/src/bin/gpfts/failover/docker_master_check_back.sh index 9b1ab8806f7..0db97596ac5 100755 --- a/src/bin/gpfts/failover/docker_master_check_back.sh +++ b/src/bin/gpfts/failover/docker_master_check_back.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash if !type gpssh >/dev/null 2>&1; then echo "[FATAL]:- gpssh not exist, script Exits!" diff --git a/src/bin/gpfts/failover/docker_segment_check_back.sh b/src/bin/gpfts/failover/docker_segment_check_back.sh index 2776415b40e..94bb4b3c4da 100755 --- a/src/bin/gpfts/failover/docker_segment_check_back.sh +++ b/src/bin/gpfts/failover/docker_segment_check_back.sh @@ -1,4 +1,4 @@ - +#!/usr/bin/env bash if !type gpssh >/dev/null 2>&1; then echo "[FATAL]:- gpssh not exist, script Exits!" diff --git a/src/bin/gpfts/failover/docker_standby_check_back.sh b/src/bin/gpfts/failover/docker_standby_check_back.sh index 81abd790efb..fe2dce7bca3 100755 --- a/src/bin/gpfts/failover/docker_standby_check_back.sh +++ b/src/bin/gpfts/failover/docker_standby_check_back.sh @@ -1,4 +1,4 @@ - +#!/usr/bin/env bash if !type gpssh >/dev/null 2>&1; then echo "[FATAL]:- gpssh not exist, script Exits!" diff --git a/src/bin/gpfts/failover/master_check_back.sh b/src/bin/gpfts/failover/master_check_back.sh index 9b1ab8806f7..0db97596ac5 100755 --- a/src/bin/gpfts/failover/master_check_back.sh +++ b/src/bin/gpfts/failover/master_check_back.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash if !type gpssh >/dev/null 2>&1; then echo "[FATAL]:- gpssh not exist, script Exits!" diff --git a/src/bin/gpfts/failover/segment_all_down.sh b/src/bin/gpfts/failover/segment_all_down.sh index 954801b923b..1121f54fbbc 100755 --- a/src/bin/gpfts/failover/segment_all_down.sh +++ b/src/bin/gpfts/failover/segment_all_down.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash if !type pg_ctl >/dev/null 2>&1; then echo "[FATAL]:- pg_ctl not exist, script Exits!" diff --git a/src/bin/gpfts/failover/segment_check_back.sh b/src/bin/gpfts/failover/segment_check_back.sh index 91f57d69107..ec55ab64982 100755 --- a/src/bin/gpfts/failover/segment_check_back.sh +++ b/src/bin/gpfts/failover/segment_check_back.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash if !type gprecoverseg >/dev/null 2>&1; then echo "[FATAL]:- gprecoverseg not exist, script Exits!" diff --git a/src/bin/gpfts/failover/standby_check_back.sh b/src/bin/gpfts/failover/standby_check_back.sh index 81abd790efb..fe2dce7bca3 100755 --- a/src/bin/gpfts/failover/standby_check_back.sh +++ b/src/bin/gpfts/failover/standby_check_back.sh @@ -1,4 +1,4 @@ - +#!/usr/bin/env bash if !type gpssh >/dev/null 2>&1; then echo "[FATAL]:- gpssh not exist, script Exits!"