mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
24c12b48a1
On systems with musl libc, hostid(1) always prints "00000000", which will cause improper behavior when the 90zfs module is configured in a dracut initramfs. Work around this by copying the host /etc/hostid if the file exists, and otherwise only write /etc/hostid if hostid(1) returns something meaningful. This avoids zgenhostid creating a random /etc/hostid for the initramfs, which could lead to errors when trying to import the pool if spl_hostid isn't defined in the kernel command line. Furthermore, tag the /etc/hostid file as hostonly, since it is system specific and shouldn't be taken into account when trying to use an initramfs generated in one system to boot into a different system. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Georgy Yakovlev <gyakovlev@gentoo.org> Co-authored-by: Andrew J. Hesford <ajh@sideband.org> Signed-off-by: Érico Rolim <erico.erc@gmail.com> Closes #11174 Closes #11189 |
||
---|---|---|
.. | ||
.gitignore | ||
export-zfs.sh.in | ||
Makefile.am | ||
module-setup.sh.in | ||
mount-zfs.sh.in | ||
parse-zfs.sh.in | ||
zfs-env-bootfs.service.in | ||
zfs-generator.sh.in | ||
zfs-lib.sh.in | ||
zfs-load-key.sh.in | ||
zfs-needshutdown.sh.in | ||
zfs-rollback-bootfs.service.in | ||
zfs-snapshot-bootfs.service.in |