From 55fd8ceab6ce239cc11f881236a6ac52ecd08849 Mon Sep 17 00:00:00 2001 From: Antonio Russo Date: Thu, 21 Jan 2021 13:58:24 -0700 Subject: [PATCH] Install zgenhostid to sbindir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: наб Authored-by: Antonio Russo Reviewed-by: Brian Behlendorf Signed-off-by: Antonio Russo Closes #11485 --- cmd/zgenhostid/Makefile.am | 2 +- contrib/dracut/90zfs/module-setup.sh.in | 4 ++-- rpm/generic/zfs.spec.in | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/zgenhostid/Makefile.am b/cmd/zgenhostid/Makefile.am index 0ba791f7c..87a42de5f 100644 --- a/cmd/zgenhostid/Makefile.am +++ b/cmd/zgenhostid/Makefile.am @@ -1,5 +1,5 @@ include $(top_srcdir)/config/Rules.am -bin_PROGRAMS = zgenhostid +sbin_PROGRAMS = zgenhostid zgenhostid_SOURCES = zgenhostid.c diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 42afda602..b6b86e2ea 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -5,7 +5,7 @@ check() { [ "${1}" = "-d" ] && return 0 # Verify the zfs tool chain - for tool in "@bindir@/zgenhostid" "@sbindir@/zpool" "@sbindir@/zfs" "@mounthelperdir@/mount.zfs" ; do + for tool in "@sbindir@/zgenhostid" "@sbindir@/zpool" "@sbindir@/zfs" "@mounthelperdir@/mount.zfs" ; do test -x "$tool" || return 1 done # Verify grep exists @@ -38,7 +38,7 @@ install() { inst_rules @udevruledir@/60-zvol.rules dracut_install hostid dracut_install grep - dracut_install @bindir@/zgenhostid + dracut_install @sbindir@/zgenhostid dracut_install @sbindir@/zfs dracut_install @sbindir@/zpool # Workaround for https://github.com/openzfs/zfs/issues/4749 by diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index ef0699d36..f1f09f635 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -442,7 +442,7 @@ systemctl --system daemon-reload >/dev/null || true # Core utilities %{_sbindir}/* %{_bindir}/raidz_test -%{_bindir}/zgenhostid +%{_sbindir}/zgenhostid %{_bindir}/zvol_wait # Optional Python 2/3 scripts %{_bindir}/arc_summary