提交 1cdbe4d2 编写于 作者: D Daniel P. Berrange

Two RPM conditional fixes for RHEL-7

Ensure systemd is used in RHEL-7 and cgconfig is not used in
RHEL-7
上级 2e13b9ab
...@@ -133,8 +133,9 @@ ...@@ -133,8 +133,9 @@
%define with_hyperv 0 %define with_hyperv 0
%endif %endif
# Although earlier Fedora has systemd, libvirt still used sysvinit # Fedora 17 / RHEL-7 are first where we use systemd. Although earlier
%if 0%{?fedora} >= 17 # Fedora has systemd, libvirt still used sysvinit there.
%if 0%{?fedora} >= 17 || 0{?rhel} >= 7
%define with_systemd 1 %define with_systemd 1
%endif %endif
...@@ -1348,9 +1349,9 @@ if [ $1 -eq 1 ] ; then ...@@ -1348,9 +1349,9 @@ if [ $1 -eq 1 ] ; then
fi fi
%else %else
%if %{with_cgconfig} %if %{with_cgconfig}
# Starting with Fedora 16, systemd automounts all cgroups, and cgconfig is # Starting with Fedora 16/RHEL-7, systemd automounts all cgroups,
# no longer a necessary service. # and cgconfig is no longer a necessary service.
%if 0%{?rhel} || (0%{?fedora} && 0%{?fedora} < 16) %if (0%{?rhel} && 0%{?rhel} < 7) || (0%{?fedora} && 0%{?fedora} < 16)
if [ "$1" -eq "1" ]; then if [ "$1" -eq "1" ]; then
/sbin/chkconfig cgconfig on /sbin/chkconfig cgconfig on
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册