From c7e0ba777bc1060768118559217bd7a672116044 Mon Sep 17 00:00:00 2001 From: Jonathan Billings Date: Wed, 23 Apr 2014 11:59:13 -0400 Subject: misc/bcfg2.spec Remove duplicate checks for systemd in RPM scriptlets In the RPM scriptlets, there's first a check for fedora 18 or greater, then if that's not true, a check for fedora 16 or greater. Due to some bug in how nested %if statements work in RPM scriptlets, the second test is evaluating true even on non-Fedora systems, which is leading to systemd commands being put in RHEL6 RPM scriptlets. This change removes the second check. If there needed to be a check for versions of Fedora 16 and 17, they will no longer work, but since neither of those are supported versions of Fedora, I suspect we don't need to include logic for them. --- misc/bcfg2.spec | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'misc') diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index 6a4153472..f79483858 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -558,8 +558,6 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Initial installation %if 0%{?suse_version} %fillup_and_insserv -f bcfg2 - %else %if 0%{?fedora} >= 16 - /bin/systemctl daemon-reload >/dev/null 2>&1 || : %else /sbin/chkconfig --add bcfg2 %endif %endif @@ -574,8 +572,6 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Initial installation %if 0%{?suse_version} %fillup_and_insserv -f bcfg2-server - %else %if 0%{?fedora} >= 16 - /bin/systemctl daemon-reload >/dev/null 2>&1 || : %else /sbin/chkconfig --add bcfg2-server %endif %endif @@ -590,9 +586,6 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Package removal, not upgrade %if 0%{?suse_version} %stop_on_removal bcfg2 - %else %if 0%{?fedora} >= 16 - /bin/systemctl --no-reload disable bcfg2.service > /dev/null 2>&1 || : - /bin/systemctl stop bcfg2.service > /dev/null 2>&1 || : %else /sbin/service bcfg2 stop &>/dev/null || : /sbin/chkconfig --del bcfg2 @@ -609,9 +602,6 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ %if 0%{?suse_version} %stop_on_removal bcfg2-server %stop_on_removal bcfg2-report-collector - %else %if 0%{?fedora} >= 16 - /bin/systemctl --no-reload disable bcfg2-server.service > /dev/null 2>&1 || : - /bin/systemctl stop bcfg2-server.service > /dev/null 2>&1 || : %else /sbin/service bcfg2-server stop &>/dev/null || : /sbin/chkconfig --del bcfg2-server @@ -630,8 +620,6 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ # Package upgrade, not uninstall %if 0%{?suse_version} %insserv_cleanup - %else %if 0%{?fedora} >= 16 - /bin/systemctl try-restart bcfg2.service >/dev/null 2>&1 || : %else /sbin/service bcfg2 condrestart &>/dev/null || : %endif %endif @@ -642,16 +630,9 @@ sed "s@http://www.w3.org/2001/xml.xsd@file://$(pwd)/schemas/xml.xsd@" \ %if 0%{?fedora} >= 18 %systemd_postun bcfg2-server.service %else - %if 0%{?fedora} >= 16 - /bin/systemctl daemon-reload >/dev/null 2>&1 || : - %endif if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall - %if 0%{?fedora} >= 16 - /bin/systemctl try-restart bcfg2-server.service >/dev/null 2>&1 || : - %else /sbin/service bcfg2-server condrestart &>/dev/null || : - %endif fi %if 0%{?suse_version} if [ $1 -eq 0 ]; then -- cgit v1.2.3-1-g7c22