From 81e93d1073c2068e3d0aac36456f1fd0b23e8b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Thu, 4 Oct 2012 13:57:09 +0200 Subject: [PATCH] Run %triggerun regardless of systemd_post variable definition --- rwall.spec | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/rwall.spec b/rwall.spec index 77956c7..afc8150 100644 --- a/rwall.spec +++ b/rwall.spec @@ -1,7 +1,7 @@ Summary: Client for sending messages to a host's logged in users Name: rwall Version: 0.17 -Release: 36%{?dist} +Release: 37%{?dist} License: BSD Url: ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/ Group: System Environment/Daemons @@ -83,41 +83,21 @@ make INSTALLROOT=${RPM_BUILD_ROOT} install install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_unitdir}/ %post server -%if 0%{?systemd_post:1} - %systemd_post rwalld.service -%else - if [ $1 = 1 ]; then - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - fi +%systemd_post rwalld.service - # Package with native systemd unit file is installed for the first time - %triggerun -- rwall-server < 0.17-33 - %{_bindir}/systemd-sysv-convert --save rwalld >/dev/null 2>&1 ||: +# Package with native systemd unit file is installed for the first time +%triggerun -- rwall-server < 0.17-33 +%{_bindir}/systemd-sysv-convert --save rwalld >/dev/null 2>&1 ||: - # Run these because the SysV package being removed won't do them - /sbin/chkconfig --del rwalld >/dev/null 2>&1 || : - /bin/systemctl try-restart rwalld.service >/dev/null 2>&1 || : -%endif +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del rwalld >/dev/null 2>&1 || : +/bin/systemctl try-restart rwalld.service >/dev/null 2>&1 || : %preun server -%if 0%{?systemd_preun:1} - %systemd_preun rwalld.service -%else - if [ $1 = 0 ]; then - /bin/systemctl --no-reload disable rwalld.service >/dev/null 2>&1 || : - /bin/systemctl stop rwalld.service >/dev/null 2>&1 || : - fi -%endif +%systemd_preun rwalld.service %postun server -%if 0%{?systemd_postun_with_restart:1} - %systemd_postun_with_restart rwalld.service -%else - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - if [ $1 -ge 1 ]; then - /bin/systemctl try-restart rwalld.service >/dev/null 2>&1 || : - fi -%endif +%systemd_postun_with_restart rwalld.service %files %{_bindir}/rwall @@ -130,6 +110,9 @@ install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_unitdir}/ %{_unitdir}/* %changelog +* Thu Oct 04 2012 Honza Horak - 0.17-37 +- Run %%triggerun regardless of systemd_post variable definition + * Tue Sep 11 2012 Honza Horak - 0.17-36 - added ordering dependencies to rpcbind - Minor spec file changes