From 63283b1c47674988a2bb004cd41f0b590418d90d Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Mon, 12 Oct 2026 04:15:58 +0400 Subject: [PATCH] minio-init: check the bingo prefix without grep The minio/mc image has no grep, so the emptiness check always failed and the photos were never mirrored into datacenterbingo-photos. Assisted-by: Claude:opus-5 --- init/minio-bootstrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/minio-bootstrap.sh b/init/minio-bootstrap.sh index 2715b32..c4bc738 100644 --- a/init/minio-bootstrap.sh +++ b/init/minio-bootstrap.sh @@ -83,7 +83,8 @@ write_ro_prefix_policy "datacenterbingo-photos-ro" "datacenterbingo-photos" "" # Migration from asxpio-invoices/bingo/: copy whatever is missing. Remove # this (and the old bingo-ro policy below) once the old prefix is deleted. -if mc ls "local/asxpio-invoices/bingo/" 2>/dev/null | grep -q .; then +# (The mc image has no grep; test the listing with plain sh.) +if [ -n "$(mc ls "local/asxpio-invoices/bingo/" 2>/dev/null)" ]; then mc mirror --quiet "local/asxpio-invoices/bingo" "local/datacenterbingo-photos/bingo" fi