|Skip Navigation Links|
|Exit Print View|
|man pages section 4: File Formats Oracle Solaris 11 Information Library|
- local source for system name
When a machine is standalone or its IP address is configured locally, the svc:/system/identity:node SMF service has a property, namely nodename, for setting the system name.
To set the name of the node use the following command:
# svccfg -s node setprop config/nodename = "mynodename" # svcadm refresh node
To see the currently set nodename for the host use the following command:
$ svcprop -p config/nodename svc:/system/identity:node
The value of this property used to be located in the /etc/nodename file. If /etc/nodename is present and the SMF service property is not set, the SMF service reads /etc/nodename and populates the property.
Once the SMF service property has been set, the /etc/nodename file is removed and no longer consulted. By convention, the system name is the same as the hostname associated with the IP address of the primary network interface, for example, hostname.hme0.
If the machine's network configuration is delivered by the RPC bootparams protocol, neither the SMF service property nor the /etc/nodename file are used, as the system name is delivered by the remote service.
If the machine's network configuration is delivered by the DHCP protocol, the SMF service property is used only if the DHCP server does not provide a value for the Hostname option (DHCP standard option code 12).
A system name configured in the SMF service should be unique within the system's name service domain in order to ensure that any network services provided by the system operate correctly.
Given a system name value, regardless of source, uname -S sets the system name of the running system.
Example 1 Syntax for the nodename File
The syntax for nodename consists of a single line containing the system's name. For example, for a system named myhost:
See attributes(5) for descriptions of the following attributes:
The nodename file is modified by Solaris installation and de-installation scripts.