N Adding User Content To System Configuration Files

Use this procedure to add user specified content to AVDF template files. AVDF allows specific content to persist on the appliance through various procedures such as upgrade and regular system configuration. This is handled by the user interface of the appliance.

Every template configuration file on the appliance allows to add user defined content. An additional file is available that contains such content. Within this file an additional output data file must be added. Any user defined content is added to the end of the final output file.

Note:

Not all template files are written regularly. In some cases files are only updated on upgrade, while some are updated frequently like networking configuration.

To create and include a file for a template generated content follow this procedure:

  1. Create a root-owned directory where all the files can be stored.

    Note:

    The directory must be owned by root user and must have write access.

    The following commands can be executed to create the directory named include:

    mkdir /usr/local/dbfw/templates/include

    chown root:root /usr/local/dbfw/templates/include

    chmod 755 /usr/local/dbfw/templates/include

  2. Create a new directory to have data automatically inserted into the output of a template file. The name of this new directory can be prefixed with after-.
  3. The list of files that have user data appended are stored at /usr/local/dbfw/templates
  4. To add further host names to /etc/hosts, add the file named after-template-hosts to the directory /usr/local/dbfw/templates/include.

    Note:

    The file after-template-hosts must be read-only and owned by root. It may be world readable also.

  5. Execute the following commands to set the required permission after creating the after-template-hosts file:

    touch /usr/local/dbfw/templates/include/after-template-hosts

    chmod 444 /usr/local/dbfw/templates/include/after-template-hosts

    chown root:root /usr/local/dbfw/templates/include/after-template-hosts

  6. Modify the file to include new user data. This is used when the template file and the data is appended to the generated file. The newly appended data is found in the end of the generated file.
  7. In most cases it is necessary to restart or re-initialize the affected component before the changes are completely applied. Refer to the Oracle Linux documentation for more information about the components and files modified.