summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorDarik Horn <[email protected]>2011-06-23 22:10:27 -0500
committerBrian Behlendorf <[email protected]>2011-06-24 09:58:08 -0700
commit79593b0dec57ee94c5bb56cdc2770ebde81ecea9 (patch)
tree6ac245d04f4831d90152a3ad0c67b40999e678f0 /include/sys
parent0d54dcb56685ac58e68e46b7848f0f2c2863dc6e (diff)
Stabilize the hostid for RPM installations.
ZFS requires a stable hostid to recognize foreign pool imports, but the hostid of a Linux system can change if the /etc/hostid file is missing, particularly during DHCP lease updates. Ensure that the system hostid is stable by creating the /etc/hostid file from the output of the /usr/bin/hostid utility. The /sbin/genhostid utility that is provided by the initscripts package is not used because it creates a random hostid, which breaks upgrades on systems that already have the SPL module installed. The external `printf` is used because the dash builtin lacks the byte format. Conveniences like a ${HOSTID:$ii:2} substring range or a `sed` one-liner are similarly avoided.
Diffstat (limited to 'include/sys')
0 files changed, 0 insertions, 0 deletions