print out return value of btrfs send-revieve pipe
This commit is contained in:
@@ -49,7 +49,7 @@ batch=0
|
|||||||
btrfs_quota=0
|
btrfs_quota=0
|
||||||
btrfs_quota_tmp=1
|
btrfs_quota_tmp=1
|
||||||
btrfs_verbose_flag=
|
btrfs_verbose_flag=
|
||||||
calculate_btrfs_size=0
|
calculate_btrfs_size=1
|
||||||
color=0
|
color=0
|
||||||
donotify=0
|
donotify=0
|
||||||
dryrun=0
|
dryrun=0
|
||||||
@@ -1940,13 +1940,17 @@ run_backup () {
|
|||||||
"$selected_config"
|
"$selected_config"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# the actual data sync to the target
|
# the actual data sync to the target
|
||||||
# this may take a while, depending on datasize and line-speed
|
# this may take a while, depending on datasize and line-speed
|
||||||
if [ "$verbose" -ge 3 ]; then
|
if [ "$verbose" -ge 3 ]; then
|
||||||
printf "cmd: '%s'\n" "$cmd"
|
printf "cmd: '%s'\n" "$cmd"
|
||||||
fi
|
fi
|
||||||
$(eval "$cmd")
|
ret=$(eval "$cmd")
|
||||||
if [ "$?" -gt 0 ]; then
|
if [ "$verbose" -ge 3 ]; then
|
||||||
|
printf "cmd returned: '%s' \n" "$ret"
|
||||||
|
fi
|
||||||
|
if [ "$ret" -gt 0 ]; then
|
||||||
printf "${RED}BTRFS_PIPE: %s${NO_COLOR}\n" "$(cat <"$BTRFS_PIPE")"
|
printf "${RED}BTRFS_PIPE: %s${NO_COLOR}\n" "$(cat <"$BTRFS_PIPE")"
|
||||||
error_count=$((error_count+1))
|
error_count=$((error_count+1))
|
||||||
# go for next configuration
|
# go for next configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user