NAME

makehosts - sets up /etc/hosts from the xCAT hosts table.


SYNOPSIS

makehosts [-n] [noderange] [-l|--longnamefirst] [-d] [-m|--mactolinklocal]

makehosts {-h|--help}


DESCRIPTION

makehosts updates the /etc/hosts file based on entries in the hosts table in the xCAT database. If your node hostnames and IP addresses follow a regular pattern, you can use just a few regular expressions in the hosts table and then easily generate /etc/hosts using makehosts.


OPTIONS

-n

Completely replace the /etc/hosts file, losing any previous content. If this option is not specified, it will only replace the lines in the file that correspond to the nodes in the specified noderange.

-l|--longnamefirst

The long name of the host will appear before the short name for each host in the /etc/hosts file. The default is short name first.

-m|--mactolinklocal

Updates /etc/hosts file with IPv6 link local addresses, the link local address is generated from the mac address stored in mac table.

-d

Delete rather than create records.


EXAMPLES


SEE ALSO

hosts(5), makedns(8)