On Thursday 13 December 2007 15:36, Bastian Friedrich wrote: > Hi, > > I'd like to access the name of the current file set in a "RunScript" > statement in my Job configuration. Substitutions such as "%n" (for Job > name) are available in such statements; a substitution for the file set > name is not available. > > The reason seems to be that the corresponding function, edit_job_codes(), > is implemented in lib/util.c; the required member variables of the current > JCR object are not available there. > > Is there any way to access the current fileset name -- if available -- in > the sources that reside in the lib directory?
As you noted, since the code is in the library, as it stands, it does reduce duplication of code, but it is not possible to customize it for each daemon. However, it would not be very hard to add the code you want. Simply add a new argument to the subroutine, which is a callback subroutine that can be called if the main edit_job_codes() does not recognize a code. The callback routine would either return a string to be edited into the output or a NULL, in which case edit_job_codes() would fail the job. It should amount to not more than 20 or 30 lines of code. Best regards, Kern ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
