[PATCH 5/9] xfs_scrub_fail: return the failure status of the mailer program

Darrick J. Wong
2023-12-31T22:53:39Z

We should return the exit code of the mailer program sending the scrub
failure reports, since that's much more important to anyone watching the
system.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
scrub/xfs_scrub_fail.in | 1 +
1 file changed, 1 insertion(+)

diff --git a/scrub/xfs_scrub_fail.in b/scrub/xfs_scrub_fail.in
index d6a3d92159b..d3275f9897c 100755
--- a/scrub/xfs_scrub_fail.in
+++ b/scrub/xfs_scrub_fail.in
@@ -33,3 +33,4 @@ So sorry, the automatic xfs_scrub of ${mntpoint} on ${hostname} failed.
A log of what happened follows:
ENDL
systemctl status --full --lines 4294967295 "${scrub_svc}") | "${mailer}" -t -i
+exit "${PIPESTATUS[1]}"