Configuration strings

In addition to environment variables, QNX Neutrino uses configuration strings. These are system variables that are like environment variables, but are more dynamic.

When you set an environment variable, the new value affects only the current instance of the shell and any of its children that you create after setting the variable; when you set a configuration string, its new value is immediately available to the entire system.

Note: QNX Neutrino also supports configurable limits, which are variables that store information about the system. For more information, see the Understanding System Limits chapter.

You can use the POSIX getconf utility to get the value of a configurable limit or a configuration string. QNX Neutrino also defines a non-POSIX setconf utility that you can use to set configuration strings if you're logged in as root. In a program, call confstr() to get the value of a configuration string.

The names of configuration strings start with _CS_ and are in uppercase, although getconf and setconf let you use any case, omit the leading underscore, or the entire prefix—provided that the rest of the name is unambiguous.

The configuration strings include:

_CS_ARCHITECTURE
The name of the instruction-set architecture.
_CS_DOMAIN
The domain of this node in the network.
_CS_HOSTNAME
The name of this node in the network.
Note: A hostname can consist only of letters, numbers, and hyphens, and must not start or end with a hyphen. For more information, see RFC 952.

If you change this configuration string, be sure you also change the HOSTNAME environment variable. The hostname utility always gives the value of the _CS_HOSTNAME configuration string.

_CS_HW_PROVIDER
The name of the hardware's manufacturer.
_CS_HW_SERIAL
The serial number associated with the hardware.
_CS_LIBPATH
The default path for locating shared objects. For more information, see Setting PATH and LD_LIBRARY_PATH.”
_CS_LOCALE
The locale string.
_CS_MACHINE
The type of hardware the OS is running on.
_CS_PATH
The default path for finding system utilities. For more information, see Setting PATH and LD_LIBRARY_PATH.”
_CS_RELEASE
The current release level of the OS.
_CS_RESOLVE
An in-memory version of the /etc/resolv.conf file, excluding the domain name.
_CS_SRPC_DOMAIN
The secure RPC (Remote Procedure Call) domain.
_CS_SYSNAME
The name of the OS.
_CS_TIMEZONE
An alternate source to the TZ for time-zone information. For more information, see Setting the time zone,” below.
_CS_VERSION
The version of the OS.