Use permission verfication scripts on SUSE distributions

refs #5818
This commit is contained in:
Tim Hardeck 2014-07-04 13:29:40 +02:00 committed by Gunnar Beutner
parent c8db76ad6e
commit 074521b69c
1 changed files with 11 additions and 1 deletions

View File

@ -81,6 +81,9 @@ Meta package for Icinga 2 Core, DB IDO and Web.
Summary: Icinga 2 binaries and libraries Summary: Icinga 2 binaries and libraries
Group: Applications/System Group: Applications/System
%if "%{_vendor}" == "suse"
PreReq: permissions
%endif
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libstdc++-devel BuildRequires: libstdc++-devel
@ -301,6 +304,11 @@ getent group %{icingacmd_group} >/dev/null || %{_sbindir}/groupadd -r %{icingacm
getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/%{name} -G %{icingacmd_group} -g %{icinga_group} %{icinga_user} getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/%{name} -G %{icingacmd_group} -g %{icinga_group} %{icinga_user}
exit 0 exit 0
%if "%{_vendor}" == "suse"
%verifyscript bin
%verify_permissions -e /var/run/icinga2/cmd
%endif
%if "%{_vendor}" == "suse" %if "%{_vendor}" == "suse"
%if 0%{?use_systemd} %if 0%{?use_systemd}
@ -314,7 +322,9 @@ exit 0
%post bin %post bin
# suse # suse
%if 0%{?suse_version} %if 0%{?suse_version}
%if 0%{?suse_version} >= 1310
%set_permissions /var/run/icinga2/cmd
%endif
%if 0%{?use_systemd} %if 0%{?use_systemd}
%fillup_only %{name} %fillup_only %{name}
%service_add_post %{name}.service %service_add_post %{name}.service