diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index 711e6c751..2e89abd0e 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -19,6 +19,15 @@ %endif %endif +# Set the default _bashcompletiondir directory based on distribution. +%if %{undefined _bashcompletiondir} +%if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}%{?openEuler} +%global _bashcompletiondir /etc/bash_completion.d +%else +%global _bashcompletiondir /usr/share/bash-completion +%endif +%endif + # Set the default dracut directory based on distribution. %if %{undefined _dracutdir} %if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}%{?openEuler}