HomeFreeBSD

Read the /etc/hostid file directly.

Description

Read the /etc/hostid file directly.

Deprecate the /usr/bin/hostid call by reading the /etc/hostid file
directly. Add the spl_hostid_path parameter to override the default
/etc/hostid path.

Rename the set_hostid() function to hostid_exec() to better reflect
actual behavior and complement the new hostid_read() function.

Use HW_INVALID_HOSTID as the spl_hostid sentinel value because
zero seems to be a valid gethostid() result on Linux.

Details

Provenance
Darik Horn <dajhorn@vanadac.com>Authored on Jun 20 2011, 7:53 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 24 2011, 4:58 PM
Parents
rGbf0c60c060ac: Add linux compatibility tests
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG0d54dcb56685: Read the /etc/hostid file directly. (authored by Darik Horn <dajhorn@vanadac.com>).Jun 24 2011, 4:58 PM