From 3e27601f900aa91c4f17ae4d24b48564fab157e4 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 21 May 2018 22:01:57 +0200 Subject: [PATCH] dnsdist: fix RPM scriptlets MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We used the non-existing `%elif` rpm macro ¯\_(ツ)_/¯. --- build-scripts/build-dnsdist-rpm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/build-scripts/build-dnsdist-rpm b/build-scripts/build-dnsdist-rpm index 118bf2e2b..4a538ee8b 100755 --- a/build-scripts/build-dnsdist-rpm +++ b/build-scripts/build-dnsdist-rpm @@ -172,38 +172,44 @@ exit 0 %post -%if 0%{?el6} +%if 0%{?rhel} < 7 if [ -x /sbin/initctl ]; then /sbin/initctl reload-configuration fi -%elif 0%{?suse_version} +%else +%if 0%{?suse_version} %service_add_post %{name}.service %else %systemd_post %{name}.service %endif +%endif %preun -%if 0%{?el6} +%if 0%{?rhel} < 7 if [ \$1 -eq 0 ] ; then # This is package removal, not upgrade /sbin/stop %{name} >/dev/null 2>&1 || : fi -%elif 0%{?suse_version} +%else +%if 0%{?suse_version} %service_del_preun %{name}.service %else %systemd_preun %{name}.service %endif +%endif %postun -%if 0%{?el6} +%if 0%{?rhel} < 7 if [ -x /sbin/initctl ] && /sbin/initctl status %{name} 2>/dev/null | grep -q 'running' ; then /sbin/initctl stop %{name} > /dev/null 2>&1 || : fi -%elif 0%{?suse_version} +%else +%if 0%{?suse_version} %service_del_postun %{name}.service %else %systemd_postun_with_restart %{name}.service %endif +%endif %files %{!?_licensedir:%global license %%doc} -- 2.50.1