[Top] [Prev] [Next] [Contents] [Index]

The Configuration Language

The configuration language is used in remote configuration files and for interactive configuration through a TELNET connection. The configuration language provides commands for:

Configuration Language Summary

Table 6-2 lists the general-purpose commands you can use in remote configuration files and for interactive configuration through a TELNET connection. Table 6-3 lists commands for interactive configuration through a TELNET connection only. Bold text indicates a parameter name, square brackets ( [ ] ) indicate command options, and bold italic text indicates a variable.

Table 6-2 Configuration Commands for Files and Interactive Use
Command and Description
apply Applies pending commands to the current configuration. In a configuration file, this command is usually optional; end-of-file implies the apply command.
set parameter = value
Sets the value of the specified parameter. If you are modifying parameters interactively, you must use the apply command to put them into effect.

The word set is optional.

lock 1 and unlock 1
lock prevents other clients of the Configuration daemon from issuing commands.
unlock allows other clients of the Configuration daemon to issue commands.
read nvram read filename
Reads configuration information from a file or from NVRAM.

read nvram 1 reads all of the configuration information stored in NVRAM.

read filename reads the configuration information stored in the specified file.

The include command is equivalent to read.

write nvram write filename parameter write filename [ all | group | changes ] [ read-write | read-only ]
Writes current configuration information to NVRAM or to the specified filename.

write nvram 1 writes parameters saved in NVRAM from the current configuration.

write filename parameter writes a parameter and its current value to a file.

write filename [ all | group | changes ] [ read-write | read-only ]:

The dump and save commands are equivalent to write.

protect [ parameter | group | all ] 1 2
Prevents anyone from reading or modifying the specified parameter(s):
get-protect [ parameter | group | all ] 1 2
Prevents anyone from reading the specified parameter(s):

set-protect [ parameter | group | all ] 1 2
Prevents anyone from modifying the specified parameter(s):


1 This command is not available when accessing the Preferences daemon through a TELNET connection
2 The protect commands are irreversible. You can remove protection only by rebooting the terminal.

Table 6-3 Configuration Commands for Interactive Use Only
Command and Description
get parameter get [ all | groupname | changes | group ] [ read-write | read-only ]
Displays parameters and their current values.

get parameter displays the specified parameter (s).

get [ all | groupname | changes | group ] [ read-write | read-only ]:

The show command is equivalent to get.

pending Displays all changes that have not been applied.
cancel Cancels all pending changes.
help Displays a quick summary of the configuration language.
quit Disconnects from the Configuration or User Preferences daemon.

Assigning Values to Configuration Parameters

Values can be set through simple assignment statements or in tables. Parameter names, permitted values, and table entry names for all read/write parameters are given in the Remote Configuration Parameter Quick Reference.

Simple Assignment Statements

A simple assignment consists of an optional set command, a parameter name followed by an equals sign (=), and a single value. For example:


boot-tcpip-desired-server = 192.43.153.16
set boot-tcpip-desired-server = 192.43.153.16

The end of a simple assignment statement is indicated by a newline or carriage return.

Tables and Rows

Parameters that can take more than one value or require a series of related values are stored in tables composed of rows. For example, each row in the exec-startup-commands table consists of a single local client name or a local client name followed by arguments:


exec-startup-commands = {
     { wm }
     { term }
     { "login eagle" }
}

When resetting values in a row, resetting an entire row, or adding and deleting rows, you can use the row number as an index into the table. This is useful mainly in configuring a terminal through a TELNET connection. For example, to add a fourth row to the exec-startup-commands table:


exec-startup-commands[4] = { lat }

To add a row to the end of a table, use the index number -1. For example:


exec-startup-commands[-1] = { lat }

If you represent the parameters in a row as simple assignment statements enclosed in parentheses, their order in the row does not matter. Using assignment statements in a row is especially useful if you are not defining all the parameters in the row. The following example shows how to reset only the baud rate in row 1 of the serial-interfaces-table, while other values in the row retain their current values.


serial-interfaces-table[1]baud-rate = 9600

In contrast, the following assignment defines the baud rate and resets the other parameters in the row to their default values:


serial-interfaces-table[1] = {(baud-rate = 9600)}

Specify an empty table or empty row in a table as follows:

For example:


config-access-control-list = { }
config-access-control-list[2] = { }

Types of Values

The following list describes the types of values used in remote configuration parameters.

Syntax Rules

Syntax rules for setting remote configuration parameter values are described in the following list:

Comments

You can include a comment in a remote configuration file by typing a pound sign (#) at the beginning of each line of comments. For example, to explain why a parameter was set to a specific value, you might type:


#Set to local to ensure that terminal
#boots from PCMCIA card instead of network host
boot-desired-source = local

Comments can also be appended to a line. For example:


boot-desired-source = local #Boot from PCMCIA
Note:
Do not append comments to a line in statements that extend for more than one line.

Assigning Parameters More than Once

A parameter can be assigned any number of times. Each assignment is processed as it is read, overriding the previous assignment.

The only exception to this rule is the unit-license-key parameter, which must be assigned for each license key when using node licensing. For more information about licensing, see the System Administrator's Guide.

Listing Commands in Order

Assignment commands are interpreted in the order in which they appear. This affects assignments that depend upon the prior execution of other statements and parameters assigned more than once.

Although most parameters do not depend on other parameters being set previously, there are a few exceptions. For example, when using a name service you may specify hosts by their names instead of their addresses. Before you can refer to a host by its name in the remote configuration file, you must set the name service parameters. For example:


#Set the name service parameters
tcpip-name-server-protocol = dns
tcpip-name-servers = { 192.43.153.16  192.43.153.24 }
apply
#Set a parameter to a host name
boot-tcpip-desired-server = peregrine

Note:
The parameters that specify the name service must be followed by an apply command.

If a parameter is assigned more than once in a configuration file, the last assignment supersedes all previous assignments.

Saving Parameters in NVRAM

When the X server reads a configuration file, it automatically saves settings to NVRAM when it reaches the end of the file.

When using interactive configuration via TELNET, you must enter an apply command to save parameters in NVRAM.

The config-auto-save-nvram parameter determines whether parameters are saved automatically to NVRAM (Change Setup Parameters -> Configuration [Configuration Daemon section] -> Auto Save NVRAM) . For more information about auto-save, see " Configuring the Apply Command" on page 6-34.



[Top] [Prev] [Next] [Contents] [Index]

Send comments, suggestions, or questions about this document to the NCD Technical Publications Department by Internet e-mail. Write to us at techpubs@ncd.com.
Copyright © 1997, NCD Inc. All rights reserved.