user-callback runs with $3=4 when there is an error. This generally functions fine. However, if the user-callback runs for a different reason (e.g. $3=1 Backup process begins), and the user-callback script subsequently fails, I would have expected the user-callback to be called again for this error (i.e. run again with $3=4). This does not occur.
FWIW @emtiu was not sure if this was a bug, so happy for this to be closed if this is the expected behaviour. My instinct was to put all the "error-fixing" stuff in the $3=4 section of the user-callback. I think this is neater, but it relies on this section being called when the user-callback fails. Alternatively (if this is not a bug, but expected behaviour), users would have to duplicate the "error-fixing" part themselves, by calling this function not only in $3=4, but also checking for errors in each other section, and calling that "error-fixing" function separately. One additional complication is if my $3=4 fails, then this could spawn an infinite loop. Perhaps that is dangerous enough to not fix this.
Backintime installed from the AUR.
user-callback runs with
$3=4
when there is an error. This generally functions fine. However, if the user-callback runs for a different reason (e.g.$3=1
Backup process begins), and the user-callback script subsequently fails, I would have expected the user-callback to be called again for this error (i.e. run again with$3=4
). This does not occur.FWIW @emtiu was not sure if this was a bug, so happy for this to be closed if this is the expected behaviour. My instinct was to put all the "error-fixing" stuff in the
$3=4
section of the user-callback. I think this is neater, but it relies on this section being called when the user-callback fails. Alternatively (if this is not a bug, but expected behaviour), users would have to duplicate the "error-fixing" part themselves, by calling this function not only in$3=4
, but also checking for errors in each other section, and calling that "error-fixing" function separately. One additional complication is if my$3=4
fails, then this could spawn an infinite loop. Perhaps that is dangerous enough to not fix this.