Fix incorrect commit to fix exit status not returned.

This commit is contained in:
dlandon
2024-06-30 12:27:43 -05:00
parent 84ad25fe18
commit 6bb27eec3a

View File

@@ -21,11 +21,13 @@ case "$1" in
/sbin/xfs_repair $4 $2 &> /var/lib/xfs/check.status.$3 &
pid=$!
echo $pid > /var/lib/xfs/check.pid.$3
# Capture the exit code once xfs_repair completes
{
wait $pid
echo $? > /var/lib/xfs/check.status.$3.exit
} &
# Wait for xfs_repair to complete synchronously
wait "$pid"
# Capture the exit code of xfs_repair
echo $? > /var/lib/xfs/check.status.$3.exit
exit 0
;;
'status')