VoyenceControl: How can the DASL "var <file>" construct be used to create a file outside of /tftpboot home directory?
search cancel

VoyenceControl: How can the DASL "var <file>" construct be used to create a file outside of /tftpboot home directory?

book

Article ID: 331053

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - NCM

Resolution

How can the var <file> construct in VoyenceControl Device Access Scripting Language (DASL) be used to create a file outside of /tftpboot home directory?



The var <file> DASL language construct can be used in DASL code with the following syntax (from the DASL guide available on Powerlink):

var <file> myFile = "myFileName"; Reads from or writes to a temporary file

The temporary myFileName file mentioned above will be created in the /tftpboot directory by default. This is because /etc/voyence.conf has /tftpboot set as the default TFTP home directory with the following variable:

# TFTP Home Directory
TFTPHOMEDIR=/tftpboot

The TFTPHOMEDIR line can be edited from the default /tftpboot to some other path. Whatever path you specify for the TFTPHOMEDIR is where the var <file> construct will create its temporary file. 

IMPORTANT! Making changes to the TFTPHOMEDIR variable is global, meaning VoyenceControl will now use the new path for file transfers instead of /tftpboot.

The path must be edited on the device server(s) and a voyence service restart must be conducted after making this change. The voyence service can be restarted with the following command:

/etc/init.d/voyence restart

Example: Specifying a path with var <file>
The var <file> construct can be edited to include a path, but whatever path is given will be appended to the end of the path specified for $TFTPHOMEDIR. Consider the following example:

  1. The TFTPHOMEDIR is changed from /tftpboot to /opt,
  2. The following syntax is then used for the var <file> construct:

    var <file> myFile = "/voyence/data/myFileName";

     
  3. The myFileName file in the above example will be created in /opt/voyence/data directory.