|
|
@@ -9,6 +9,7 @@
|
|
|
%@bcond_runautogen@ runautogen
|
|
|
%@bcond_systemd@ systemd
|
|
|
%@bcond_install_qnetd_in_sbin@ install_qnetd_in_sbin
|
|
|
+%@bcond_use_sysusers@ use_sysusers
|
|
|
|
|
|
%global gitver %{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}
|
|
|
%global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
|
|
|
@@ -105,6 +106,10 @@ sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \
|
|
|
%{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd
|
|
|
%endif
|
|
|
|
|
|
+%if %{with use_sysusers}
|
|
|
+install -m0644 -D init/corosync-qnetd.sysusers.conf.example %{buildroot}%{_sysusersdir}/corosync-qnetd.conf
|
|
|
+%endif
|
|
|
+
|
|
|
%description
|
|
|
This package contains the Corosync Cluster Engine Qdevice, script for creating
|
|
|
NSS certificates and an init script.
|
|
|
@@ -166,7 +171,9 @@ The Corosync Cluster Engine Qdevice
|
|
|
%package -n corosync-qnetd
|
|
|
Summary: The Corosync Cluster Engine Qdevice Network Daemon
|
|
|
Requires: nss-tools
|
|
|
+%if %{without use_sysusers}
|
|
|
Requires(pre): shadow-utils
|
|
|
+%endif
|
|
|
|
|
|
%if %{with systemd}
|
|
|
%{?systemd_requires}
|
|
|
@@ -177,10 +184,12 @@ This package contains the Corosync Cluster Engine Qdevice Network Daemon,
|
|
|
script for creating NSS certificates and an init script.
|
|
|
|
|
|
%pre -n corosync-qnetd
|
|
|
+%if %{without use_sysusers}
|
|
|
getent group coroqnetd >/dev/null || groupadd -r coroqnetd
|
|
|
getent passwd coroqnetd >/dev/null || \
|
|
|
useradd -r -g coroqnetd -d / -s /sbin/nologin -c "User for corosync-qnetd" coroqnetd
|
|
|
exit 0
|
|
|
+%endif
|
|
|
|
|
|
%post -n corosync-qnetd
|
|
|
%if %{with systemd} && 0%{?systemd_post:1}
|
|
|
@@ -228,6 +237,9 @@ fi
|
|
|
%{_mandir}/man8/corosync-qnetd-tool.8*
|
|
|
%{_mandir}/man8/corosync-qnetd-certutil.8*
|
|
|
%{_mandir}/man8/corosync-qnetd.8*
|
|
|
+%if %{with use_sysusers}
|
|
|
+%{_sysusersdir}/corosync-qnetd.conf
|
|
|
+%endif
|
|
|
|
|
|
%changelog
|
|
|
* @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
|