I've been trying to track down why, when I have a job that completes
successfully with warnings, it shows "Backup OK -- with warnings", but when
the AfterJob script runs, the "%e" variable substitution looks like "OK"
instead of "OK -- with warnings". From lib/util.c:job_status_to_str():
[...]
case JS_Terminated:
str = _("OK");
break;
case JS_Warnings:
str = _("OK -- with warnings");
break;
[...]
This is called from edit_job_codes():
[...]
case 'e':
if (jcr) {
str = job_status_to_str(jcr->JobStatus);
} else {
str = _("*none*");
}
break;
[...]
Anyway, traced it back to dird/backup.c:599:backup_cleanup():
599 #ifdef xxxx
600 if (jcr->getJobStatus() == JS_Terminated &&
601 (jcr->JobErrors || jcr->SDErrors || jcr->JobWarnings)) {
602 TermCode = JS_Warnings;
603 }
604 #endif
As far as I can see, line 602 is the only point in the code base where
JS_Warnings gets assigned to a variable. Couldn't see anything in git about
why this was commented out -- it wasn't there in 3.0.3a, and was in 5.0 just
like this, inside the #ifdef. Still commented out in 5.3.
-Jonathan Hankins
--
------------------------------------------------------------------------
Jonathan Hankins Homewood City Schools
The simplest thought, like the concept of the number one,
has an elaborate logical underpinning. - Carl Sagan
[email protected]
------------------------------------------------------------------------
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel