mirror_zfs/man/man8
Érico Rolim c4a5e3b90f zgenhostid: accept hostid arguments equal to zero.
A common usage pattern for zgenhostid, including in the ZFS dracut
module, is running it as:

  zgenhostid $(hostid)

However, zgenhostid only accepted hostid arguments greater than 0, which
meant that, when the output of hostid(1) was "00000000", zgenhostid
would error out, even though 0 is a possible return value for the
gethostid(3) function used by hostid(1):

- On current musl libc, gethostid(3) is a stub that always returns 0.
- On glibc, gethostid(3) will return 0 if /etc/hostid exists but is
  smaller than 4 bytes.

In these cases, it makes more sense for zgenhostid to treat a value of 0
as other parts of the zfs codebase do, meaning that a hostid value
couldn't be determined; therefore, it should attempt to generate a
random value to write into /etc/hostid.

The manpage and usage output have been updated to reflect this.

Whitespace has also been fixed in the usage output.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Reviewed-by: Andrew J. Hesford <ajh@sideband.org>
Signed-off-by: Érico Rolim <erico.erc@gmail.com>
Closes #11174
Closes #11189
2020-11-17 12:19:33 -08:00
..
.gitignore Ignore *.o.ur-safe build artifacts 2018-05-13 18:59:02 -07:00
fsck.zfs.8 man: Canonicalize .TH usage 2020-08-24 21:25:28 -07:00
Makefile.am Remove hard coded "Linux" OS from manpages 2020-08-21 11:55:47 -07:00
mount.zfs.8 man: Canonicalize .TH usage 2020-08-24 21:25:28 -07:00
vdev_id.8 man: Canonicalize .TH usage 2020-08-24 21:25:28 -07:00
zdb.8 Remove hard coded "Linux" OS from manpages 2020-08-21 11:55:47 -07:00
zed.8.in Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zfs_ids_to_path.8 Remove hard coded "Linux" OS from manpages 2020-08-21 11:55:47 -07:00
zfs-allow.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-bookmark.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-change-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-clone.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-create.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-destroy.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-diff.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-get.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-groupspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-hold.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-inherit.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-jail.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-list.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-load-key.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-mount-generator.8.in man: Canonicalize .TH usage 2020-08-24 21:25:28 -07:00
zfs-mount.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-program.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-project.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-projectspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-promote.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-receive.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-recv.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-redact.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-release.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-rename.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-rollback.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-send.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-set.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-share.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-snapshot.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-unallow.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unjail.8 Add FreeBSD jail support hooks 2019-12-11 11:58:37 -08:00
zfs-unload-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unmount.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-upgrade.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-userspace.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs-wait.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zfs.8 Add the Xr's to the SEE ALSO as well 2020-08-27 16:07:10 -07:00
zfsconcepts.8 Remove hard coded "Linux" OS from manpages 2020-08-21 11:55:47 -07:00
zfsprops.8 Cross-platform acltype 2020-10-16 13:05:00 -07:00
zgenhostid.8 zgenhostid: accept hostid arguments equal to zero. 2020-11-17 12:19:33 -08:00
zinject.8 man: Canonicalize .TH usage 2020-08-24 21:25:28 -07:00
zpool-add.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-attach.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-checkpoint.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-clear.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-create.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-destroy.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-detach.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-events.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-export.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-get.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-history.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-import.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-initialize.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-iostat.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-labelclear.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-list.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-offline.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-online.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-reguid.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-remove.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-reopen.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-replace.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-resilver.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-scrub.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-set.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-split.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-status.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-sync.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-trim.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-upgrade.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool-wait.8 Properly format NAME subsection of zfs/zpool subcommands 2020-10-30 16:02:38 -07:00
zpool.8 Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zpoolconcepts.8 Remove hard coded "Linux" OS from manpages 2020-08-21 11:55:47 -07:00
zpoolprops.8 zpoolprops.8: clarify vdev expansion rules 2020-11-11 11:08:57 -08:00
zstream.8 Remove hard coded "Linux" OS from manpages 2020-08-21 11:55:47 -07:00
zstreamdump.8 man: Canonicalize .TH usage 2020-08-24 21:25:28 -07:00