summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorJonathan Billings <jsbillin@umich.edu>2014-04-23 11:59:13 -0400
committerJonathan Billings <jsbillin@umich.edu>2014-04-23 12:16:52 -0400
commitc7e0ba777bc1060768118559217bd7a672116044 (patch)
tree76dcea66aeb079ee49f1ee6b913493eefbdd72e3 /misc
parentafc80cef3a253656723958f5736153025d4535c1 (diff)
downloadbcfg2-c7e0ba777bc1060768118559217bd7a672116044.tar.gz
bcfg2-c7e0ba777bc1060768118559217bd7a672116044.tar.bz2
bcfg2-c7e0ba777bc1060768118559217bd7a672116044.zip
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.
Diffstat (limited to 'misc')
-rw-r--r--misc/bcfg2.spec19
1 files changed, 0 insertions, 19 deletions
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