This section provides additional information about the TLP 2.3 default configuration file. The configuration file is divided into three parts:
Global configuration
Command-line configuration
Module-specific configuration
The following parameters make up the global configuration that is used by the TLP tool.
Specifies the default variable that is set to the TLP installation directory. You can refer to this directory in the default configuration file with the $BaseDirectory value. You can override this variable with any other value.
Specifies the path to a list of withdrawn patches. Because at least two of these roles are involved in bad patch handling, this configuration information is extracted into the global section. This format is explained in the Tlp::Repository::DirRepository description.
Specifies the path to helper programs. If not provided, the corresponding programs are looked up in the system path
Specifies file path variables. These variables are referenced directly, but they can also be referenced by other file path variables that are included in the rest of the configuration file. You can define any variable and then reference it later in the configuration file. An example is the $TargetDirectory.
Along with the automatic selection of the default configuration file that is based on the script name, the default command configuration is an effective mechanism for creating convenient TLP shell commands. You can preselect a default command within the configuration file, along with options and arguments. These default parameters are embedded within a command block, as shown in the following example:
<Command> # The module to use by default. Can be overriden by the command # line Module main # Option to be set. They should be provided in the form # "option value" as one would give it on the command line # without the '--' prefix. # Relative pathes are relative to the current working directory. <Options> snapshot LATEST explorer . target $TargetDirectory/Server/%n </Options> </Command>
The following configuration variables are used within this block:
Specifies the default module, or command, to use when no command is given from the command line.
Specifies the block that contains default module options for the default command. These options are only used when the default module is also used. Each option is placed on an extra line, with or without arguments.
Module-specific configurations are defined in blocks, according to the following scheme:
<Module name> Class Tlp::Example Var1 Value1 Var2 Value2 </Module> |
The previous example shows how to declare the name module. This module is defined in the Tlp::Example Perl module that is within the default configuration file. The configuration variables, Var1 and Var2, are module-specific. These variables are described in detail in TLP Roles and Modules. Finally, the association of a module with a role is done by using the syntax, Role Module1,Module2. Both modules are now associated with role, Role, and are therefore accessible to the patch set script.
To avoid duplicated code in configuration files, it is possible that one configuration file can extend another configuration file. For example, a configuration named, cpc.cfg, could contain the following line:
Extends tlp.cfg |
In this example, cpc.cfg uses the information that is located in tlp.cfg as fallback. This entry is added on a per-module basis. If cpc.cfg defines a module for the class, dir-producer, then no information from the tlp.cfg dir-producer definition is taken. All paths are relative to the $BaseDir/conf configuration directory.
You can switch off a module in the inherited configuration file by providing the appropriate Role directive. For example, the following entry switches off all reports:
Report |
The complete TLP configuration file is located in the /opt/SUNWtlp/conf/default/tlp.cfg directory. Configuration instructions are included in the file. Note that you must have installed the TLP software to access the file in this location.