Skip to content

Commit 7ab251e

Browse files
authored
Merge pull request #495 from hhorak/unamefix
Replace uname -i/-p with -m
2 parents f66a3d8 + a1c5263 commit 7ab251e

File tree

6 files changed

+6
-6
lines changed
  • 10/root/usr/share/container-scripts/postgresql
  • 12/root/usr/share/container-scripts/postgresql
  • 13/root/usr/share/container-scripts/postgresql
  • 15/root/usr/share/container-scripts/postgresql
  • src/root/usr/share/container-scripts/postgresql
  • test

6 files changed

+6
-6
lines changed

10/root/usr/share/container-scripts/postgresql/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ version2number ()
130130
# These cases are: non-intel architectures, and version higher or equal 12.0, 10.7, 9.6.12
131131
# Return value 0 means the hack is needed.
132132
function should_hack_data_sync_retry() {
133-
[ "$(uname -p)" == 'x86_64' ] && return 1
133+
[ "$(uname -m)" == 'x86_64' ] && return 1
134134
local version_number=$(version2number "$(pg_ctl -V | sed -e 's/^pg_ctl (PostgreSQL) //')")
135135
# this matches all 12.x and versions of 10.x where we need the hack
136136
[ "$version_number" -ge 100700 ] && return 0

12/root/usr/share/container-scripts/postgresql/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ version2number ()
130130
# These cases are: non-intel architectures, and version higher or equal 12.0, 10.7, 9.6.12
131131
# Return value 0 means the hack is needed.
132132
function should_hack_data_sync_retry() {
133-
[ "$(uname -p)" == 'x86_64' ] && return 1
133+
[ "$(uname -m)" == 'x86_64' ] && return 1
134134
local version_number=$(version2number "$(pg_ctl -V | sed -e 's/^pg_ctl (PostgreSQL) //')")
135135
# this matches all 12.x and versions of 10.x where we need the hack
136136
[ "$version_number" -ge 100700 ] && return 0

13/root/usr/share/container-scripts/postgresql/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ version2number ()
130130
# These cases are: non-intel architectures, and version higher or equal 12.0, 10.7, 9.6.12
131131
# Return value 0 means the hack is needed.
132132
function should_hack_data_sync_retry() {
133-
[ "$(uname -p)" == 'x86_64' ] && return 1
133+
[ "$(uname -m)" == 'x86_64' ] && return 1
134134
local version_number=$(version2number "$(pg_ctl -V | sed -e 's/^pg_ctl (PostgreSQL) //')")
135135
# this matches all 12.x and versions of 10.x where we need the hack
136136
[ "$version_number" -ge 100700 ] && return 0

15/root/usr/share/container-scripts/postgresql/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ version2number ()
130130
# These cases are: non-intel architectures, and version higher or equal 12.0, 10.7, 9.6.12
131131
# Return value 0 means the hack is needed.
132132
function should_hack_data_sync_retry() {
133-
[ "$(uname -p)" == 'x86_64' ] && return 1
133+
[ "$(uname -m)" == 'x86_64' ] && return 1
134134
local version_number=$(version2number "$(pg_ctl -V | sed -e 's/^pg_ctl (PostgreSQL) //')")
135135
# this matches all 12.x and versions of 10.x where we need the hack
136136
[ "$version_number" -ge 100700 ] && return 0

src/root/usr/share/container-scripts/postgresql/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ version2number ()
131131
# These cases are: non-intel architectures, and version higher or equal 12.0, 10.7, 9.6.12
132132
# Return value 0 means the hack is needed.
133133
function should_hack_data_sync_retry() {
134-
[ "$(uname -p)" == 'x86_64' ] && return 1
134+
[ "$(uname -m)" == 'x86_64' ] && return 1
135135
local version_number=$(version2number "$(pg_ctl -V | sed -e 's/^pg_ctl (PostgreSQL) //')")
136136
# this matches all 12.x and versions of 10.x where we need the hack
137137
[ "$version_number" -ge 100700 ] && return 0

test/run_test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ run_migration_test ()
693693

694694
local from_version
695695
# Only test a subset of the migration path on non-intel hosts
696-
if [ "$(uname -i)" == "x86_64" ]; then
696+
if [ "$(uname -m)" == "x86_64" ]; then
697697
local upgrade_path="9.2 9.4 9.5 9.6 10 12 13 15"
698698
else
699699
local upgrade_path="10 12 13 15"

0 commit comments

Comments
 (0)