dup-live-disk: RSYNCOPTS is now array, ignore exit 24 for rsync
This commit is contained in:
@@ -597,8 +597,8 @@ done | column -N DEV1,DEV2,LABEL1,LABEL2,FS1,FS2,SVALID\?,DVALID\?,ROOT -t -o "
|
|||||||
|
|
||||||
check_fstab || exit 1
|
check_fstab || exit 1
|
||||||
|
|
||||||
RSYNCOPTS="-axH --delete --delete-excluded"
|
|
||||||
FILTER=--filter="dir-merge .rsync-disk-copy"
|
FILTER=--filter="dir-merge .rsync-disk-copy"
|
||||||
|
declare -a RSYNCOPTS=(-axH "$FILTER" --delete --delete-excluded)
|
||||||
# copy loop
|
# copy loop
|
||||||
for ((i=0; i<${#LABELS[@]}; ++i)); do
|
for ((i=0; i<${#LABELS[@]}; ++i)); do
|
||||||
if [[ "${SRC_VALID_FS[$i]}" != y ]] || [[ "${DST_VALID_FS[$i]}" != y ]]; then
|
if [[ "${SRC_VALID_FS[$i]}" != y ]] || [[ "${DST_VALID_FS[$i]}" != y ]]; then
|
||||||
@@ -616,8 +616,15 @@ for ((i=0; i<${#LABELS[@]}; ++i)); do
|
|||||||
fi
|
fi
|
||||||
if [[ "$copy" == yes ]]; then
|
if [[ "$copy" == yes ]]; then
|
||||||
mariadb_maybe_stop
|
mariadb_maybe_stop
|
||||||
|
status=0
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
echorun_maybe rsync "$FILTER" ${RSYNCOPTS} "$SRCPART" "$DSTPART"
|
echorun_maybe rsync "${RSYNCOPTS[@]}" "$SRCPART" "$DSTPART" || status=$?
|
||||||
|
log -s "rsync status=%s\n" "$status"
|
||||||
|
if (( status != 24 && status != 0 )); then
|
||||||
|
log -s "rsync error %d" "$status"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$DSTROOTLABEL" == "${DSTLABELS[$i]}" ]]; then
|
if [[ "$DSTROOTLABEL" == "${DSTLABELS[$i]}" ]]; then
|
||||||
ROOTCOPIED=yes
|
ROOTCOPIED=yes
|
||||||
fix_fstab
|
fix_fstab
|
||||||
|
Reference in New Issue
Block a user