execute prefetch plug-in

This command passes arguments to a named command and then executes it. It is not intended for a lengthy executable and the client will only wait 60 seconds for its completion. This command can be used to authenticate or execute downloads. It can also be used to execute custom logic that can create inspectable values for subsequent add prefetch item commands.

For use cases such as updating anti-virus definitions, this command can be used to run code that processes a file to produce another file containing a set of URLs to be downloaded.

Syntax

execute prefetch plug-in "executable pathname" <args>

Where:

"executable pathname"
Is the full pathname for the plug-in to execute. This command is designed for executables that are fast to execute and return promptly. The IBM BigFix Client will block out 60 seconds of time while it waits for the command to complete; only a shutdown request can interrupt this waiting period. After 60 seconds, the Client will log a message and disable the command. When it is disabled, any actions that use this command will not execute until after the client has been restarted. In general it is expected that the command will complete much faster -- if it takes longer than two seconds to execute, the client will log an appropriate message. Relevance substitution can be used to specify the pathname.
<args>
Are arguments passed to the executable.

The exit code of the execute prefetch plug-in application is important as it informs the client of failure or success, where 0 (zero) indicates success and all other exit codes are treated as failures and result in a failed action attempt. For debugging purposes, the exit code is recorded in the client log.

Example

begin prefetch block 
      parameter "ini_file"={file "server_bf.ini" of site (value of setting 
       "MyCustomSite") of client}
      add prefetch item name=plugin.exe sha1=123 sha256=789 size=12
       url=http://mysite/myplugin.exe
      collect prefetch items
      // execute the plug-in to produce a manifest from the ini_file:
      execute prefetch plug-in "{download path "plugin.exe"}" /downloads 
       "{parameter "ini_file"}" "{download path "manifest"}"
add prefetch item {concatenation " ; " of lines of download file "manifest"}
end prefetch block

This example downloads a plug-in that processes the ini_file to produce a manifest.

Version 7.2 and above