Nagai, The attached patch fix the bug.
Jean-Louis On 04/01/2013 10:17 PM, Nagai Megumu wrote: > Hi! > exit code 「2」 of amdump cannot be generated by amanda3.3. > case of Amanda2.6, It set to exit code "2" if a file update arises. > Does exit code "2" of amdump occur in amanda3.3? > > ■step > 1.The following command is executed to an applicable file before amdump. > # while :; do echo "strange err check." >>test_file; done > > 2.Backup start. > > ■result > <ubuntu12.04+amanda3.3.1> > backup@wb:~$ /usr/sbin/amdump tconf01 > backup@wb:~$ echo $? > 0 > > backup@wb:~/tconf01$ /usr/sbin/amreport tconf01 -l log.20130401163340.0 > -f sup111485-01.log > backup@wb:~/tconf01$ echo $? > 2 > > <rhel6.3+amanda2.6.1p2-7> > -bash-4.1$ amdump tconf01 > sh-4.1$ echo $? > 2 > > -bash-4.1$ amreport tconf01 -l log.20130401175851.0 -f sup111485-01.log > -bash-4.1$ echo $? > 2 > >
diff --git a/ChangeLog b/ChangeLog index 3085dfc..bab71e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-01-22 Jean-Louis Martineau <[email protected]> + * server-src/amdump.pl: Exit with the ored value of the exit code of + all subprocess. + 2013-01-21 Jean-Louis Martineau <[email protected]> * device-src/s3-device.c: Keep a catalog of the labels. New READ-FROM-GLACIER and TRANSITION-TO-GLACIER properties. diff --git a/server-src/amdump.pl b/server-src/amdump.pl index 558a4c7..d0eabfb 100644 --- a/server-src/amdump.pl +++ b/server-src/amdump.pl @@ -128,12 +128,7 @@ sub run_subprocess { my $s = $? >> 8; debug("$proc exited with code $s"); if ($?) { - if ($exit_code == 0) { - debug("ignoring failing exit code $s from $proc"); - } else { - debug("recording failing exit code $s from $proc for amdump exit"); - $exit_code = $s; - } + $exit_code |= $s; } }
