Skip to content

Commit 0ae733c

Browse files
authored
Install zgenhostid to sbindir
zgenhostid(8) is used to modify or create /etc/hostid. This administrative tool is currently installed to bindir. System utilities are typically placed in sbin. Modify the installation directory for zgenhostid. Additionally, track this change in its use in dracut and the rpm installation. Authored-by: наб <[email protected]> Authored-by: Antonio Russo <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes openzfs#11485
1 parent 2d8f72d commit 0ae733c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/zgenhostid/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include $(top_srcdir)/config/Rules.am
22

3-
bin_PROGRAMS = zgenhostid
3+
sbin_PROGRAMS = zgenhostid
44

55
zgenhostid_SOURCES = zgenhostid.c

contrib/dracut/90zfs/module-setup.sh.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ check() {
55
[ "${1}" = "-d" ] && return 0
66

77
# Verify the zfs tool chain
8-
for tool in "@bindir@/zgenhostid" "@sbindir@/zpool" "@sbindir@/zfs" "@mounthelperdir@/mount.zfs" ; do
8+
for tool in "@sbindir@/zgenhostid" "@sbindir@/zpool" "@sbindir@/zfs" "@mounthelperdir@/mount.zfs" ; do
99
test -x "$tool" || return 1
1010
done
1111
# Verify grep exists
@@ -38,7 +38,7 @@ install() {
3838
inst_rules @udevruledir@/60-zvol.rules
3939
dracut_install hostid
4040
dracut_install grep
41-
dracut_install @bindir@/zgenhostid
41+
dracut_install @sbindir@/zgenhostid
4242
dracut_install @sbindir@/zfs
4343
dracut_install @sbindir@/zpool
4444
# Workaround for https://github.com/openzfs/zfs/issues/4749 by

rpm/generic/zfs.spec.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ systemctl --system daemon-reload >/dev/null || true
442442
# Core utilities
443443
%{_sbindir}/*
444444
%{_bindir}/raidz_test
445-
%{_bindir}/zgenhostid
445+
%{_sbindir}/zgenhostid
446446
%{_bindir}/zvol_wait
447447
# Optional Python 2/3 scripts
448448
%{_bindir}/arc_summary

0 commit comments

Comments
 (0)