[icinga-checkins] icinga.org: icinga2/master: Run systemd macros in the correct rpm scripts

git at icinga.org git at icinga.org
Thu Nov 27 15:23:05 CET 2014


Module: icinga2
Branch: master
Commit: 3c8482488302f52c0840e8eb0e3059a64fa5322f
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=3c8482488302f52c0840e8eb0e3059a64fa5322f

Author: Tim Hardeck <thardeck at suse.de>
Date:   Thu Nov 20 16:29:17 2014 +0100

Run systemd macros in the correct rpm scripts

The systemd Icinga service was moved from the package bin to common in
2.2.0 but most rpm scripts like postun, preun and so on weren't adapted
accordingly.

fixes #7738

---

 icinga2.spec |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/icinga2.spec b/icinga2.spec
index 12b9912..a9d420c 100644
--- a/icinga2.spec
+++ b/icinga2.spec
@@ -255,20 +255,18 @@ mv "%{buildroot}%{_sysconfdir}/sysconfig/%{name}" "%{buildroot}%{_localstatedir}
 getent group %{icinga_group} >/dev/null || %{_sbindir}/groupadd -r %{icinga_group}
 getent group %{icingacmd_group} >/dev/null || %{_sbindir}/groupadd -r %{icingacmd_group}
 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
-
-%if "%{_vendor}" == "suse"
-%verifyscript bin
-%verify_permissions -e %{_rundir}/%{name}/cmd
-%endif
-
 
 %if "%{_vendor}" == "suse"
 %if 0%{?use_systemd}
-%pre bin
   %service_add_pre %{name}.service
 %endif
 %endif
+exit 0
+
+%if "%{_vendor}" == "suse"
+%verifyscript bin
+%verify_permissions -e %{_rundir}/%{name}/cmd
+%endif
 
 %post common
 # suse
@@ -312,7 +310,7 @@ exit 0
 %endif
 # suse/rhel
 
-%postun bin
+%postun common
 # suse
 %if "%{_vendor}" == "suse"
 %if 0%{?using_systemd}
@@ -343,7 +341,7 @@ fi
 
 exit 0
 
-%preun bin
+%preun common
 # suse
 %if "%{_vendor}" == "suse"
 



More information about the icinga-checkins mailing list