Stabilize the hostid for the zfs-initramfs package.
The hostname and hostid of the last system to access a ZFS pool are stored in
the ZFS pool itself. A pool is foreign if, during `zfs import`, the current
hostname and hostid are different than the stored values thereof.
The hostname and hostid on Solaris are intrinsic, but they are not on Linux,
so the spl kernel module invokes /bin/hostname and /usr/bin/hostid from the
userland in its initialization routine.
However, these two indentifiers are usually undefined in the Linux initramfs
environment, so the /etc/hostname and /etc/hostid files must be added to the
initrd. Things like a DHCP lease change can affect the hostid too.
ZFS requires stable values for hostname and hostid, but basic Linux systems
do not. The hostid is therefore stabilized by creating the /etc/hostid file
in the regular environment if it does not already exist. An undefined
hostname is usuallly stable.
Neither /etc/hostname nor /etc/hostid are controlled configuration files in
Debian distributions, but the spl package nevertheless installs a dummy
/etc/hostid file that contains the HW_INVALID_HOSTID sentinal value so that
the package manager will track it.