006: fix disk check - findmnt -T (containing fs), not exact mountpoint

This commit is contained in:
wan
2026-08-31 16:13:30 +09:00
parent 873d254009
commit f7a387e821
+1 -1
View File
@@ -22,7 +22,7 @@ case "${1:-}" in
systemctl enable --now postgresql >/dev/null systemctl enable --now postgresql >/dev/null
pg_isready -q pg_isready -q
pg_lsclusters --no-header | while read -r _ _ _ _ _ datadir _; do pg_lsclusters --no-header | while read -r _ _ _ _ _ datadir _; do
if findmnt -rn "$datadir" >/dev/null; then if [[ $(findmnt -rn -o TARGET -T "$datadir") == "$PGROOT" ]]; then
echo " cluster data on dedicated disk: $datadir" echo " cluster data on dedicated disk: $datadir"
else else
echo " WARNING: $datadir is NOT on the dedicated disk" >&2 echo " WARNING: $datadir is NOT on the dedicated disk" >&2