Re: PROPERTY output in Script API
Jean-Louis Martineau <[email protected]> Mon, 16 Oct 2017 13:43:16 -0400
| Newsgroups | gmane.comp.archivers.amanda.devel |
|---|---|
| Message-ID | <[email protected]> |
Chapman, You are right about everything you wrote. The wiki server will be upgraded soon, I delay all modification to it until it is upgraded. Jean-Louis On 12/10/17 11:19 AM, Chapman Flack wrote: > On 06/15/2016 07:52 AM, Jean-Louis Martineau wrote: > > I added the following section in > > http://wiki.zmanda.com/index.php/Script_API > <http://wiki.zmanda.com/index.php/Script_API> > > > > Send property to the application > > > > A pre-dle-amcheck script running on the client can set a property for > > the application 'selfcheck' command. > > > > A pre-dle-estimate script running on the client can set a property for > > the application 'estimate' command. > > > > A pre-dle-backup script running on the client can set a property for the > > application 'backup' command. > > > > The script must print a line to stdout with the 'PROPERTY' keyword > > followed by the property name and property value > > > > eg. PROPERTY directory /new/path > > > > And the application will get the '--directory=/new/path' argument. > > > Am I right about these additional details? > > - The property value consists of all bytes succeeding the space > after the property name, up to the newline, which is not included, > or any NUL byte. A property value containing a newline or NUL > cannot be represented. > > - Scripts executed in a sequence (for example, multiple > pre-dle-backup scripts executed in order by their 'priority' > values) do not see properties set by earlier scripts in the > sequence. The properties set by the scripts are simply accumulated > to be sent to the application. > > - A script can set a multiple-valued property by printing multiple > PROPERTY lines with the same property name and one value each. > > - The application will see all properties set by the sequence of > scripts, in the order of execution of the scripts. If two or > more scripts supply values for one property, the application > will see them in order as a multiple-valued property. > > This is what I think happens, from looking at the code; if correct, > it might be worth adding to the wiki. > > -Chap This message is the property of CARBONITE, INC. and may contain confidential or privileged information. If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone. Instead, destroy it and notify me by reply e-mail