Sun N1 Service Provisioning System User's Guide and Release Notes for the OS Provisioning Plug-In 2.0

Custom Files

The custom module enables files to be created, overwritten, or appended to on the target server. Files are referenced by a value that defines three items:

For example, for a target server called banana the following line in the custom area of the template would append the contents of the file /opt/SUNWjet/Clients/banana/hosts on the JumpStart server to the file /etc/hosts on the machine banana while it was being built.

custom_files="hosts:a:/etc/hosts"

The source files must be placed correctly before the build of the target server. The files must be located within the /opt/SUNWjet directory tree.


Note –

Do not use absolute paths for the source file.

Do not refer to files that are outside of the tree, such as /etc/hosts or /etc/passwd.


The middle field of the triple specifies whether to append or overwrite the destination file on the target server. If a set of files are common to a number of target servers, consider creating a holding area within the /opt/SUNWjet/Clients directory. Place the common files within that directory. The templates for the target servers can then refer to the files as:

custom_files="../common/hosts:a:/etc/hosts ../common/ftpusers:o:/etc/ftpusers" 

Where the files are placed in /opt/SUNWjet/Clients/common rather than multiple copies in each target server specific directory. Because the template file is a Bourne shell script, you can use regular techniques to continue lines. Use the \ character, or append information to the variable custom_files="${custom_files} ......".