On a normally-configured system, this file should not be necessary. The only name server to be queried will be on the local machine. The domain name is determined from the hostname, and the domain search path is constructed from the domain name.
Beginning with SCO OpenServer Release 5.0.6, the /etc/resolv.conf file is created only if nameserver addresses and the system domain name were entered during initial installation. Configuration option values placed in /etc/resolv.conf during installation are:
nameserver primary_ip_address nameserver secondary_ip_address hostresorder local bind search domain_name
The configuration keywords are:
The search list is currently limited to six domains with a total of 256 characters.
The search keyword of a system's resolv.conf file can be overridden on a per-process basis by setting the environment variable LOCALDOMAIN to a space-separated list of search domains.
Tokens must be separated by white-space and/or a slash (/). If the slash is used, a query will stop even if the database being queried does not have the information. Otherwise, the next database specified will be searched.
For example, the following line specifies a lookup order of NIS, DNS, and finally the /etc/hosts file. All databases will be tried until a match is found.
hostresorder nis bind localThe following example, however, specifies that the query should be terminated if the answer is not found in either NIS or DNS.
hostresorder nis bind / localThe default behavior, if the keyword hostresorder is not specified or a value is not specified, is to search all three databases, regardless of failure, in the following order: bind, nis, and local. Therefore, the following statement in /etc/resolv.conf is equivalent to the default behavior:
hostresorder bind nis localNote that searching /etc/hosts prior to either of the other databases can lead to inconsistent results if the hosts file contains out-of-date information. However, avoiding network traffic during hostname lookup can be useful in situations where only demand-dial serial lines are available, since it can eliminate time and expense when resolving local names.
Note also that if neither DNS nor NIS is currently available, /etc/hosts will be searched even if local is not specified on the hostresorder line or even if local is preceded by a slash. This is so that lookups can be satisfied even when the TCP/IP protocol stack is not fully initialized.
The user can override the default search order by setting the environment variable HOSTRESORDER. For example:
HOSTRESORDER="nis bind local"
sortlist 130.155.160.0/255.255.240.0 130.155.0.0
where option is one of the following:
_res.options
.
The options keyword of a system's resolv.conf file can be amended on a per-process basis by setting the environment variable RES_OPTIONS to a space-separated list of resolver options as explained in this section.
``Configuring the Domain Name Service'' in Administering TCP/IP