提交 ecd8725c 编写于 作者: E Eric Blake

spec: silence warnings when installing in F16

https://bugzilla.redhat.com/show_bug.cgi?id=738725 documents that
'yum install libvirt' in Fedora 16 is rather noisy.  This fixes
the problems.

* libvirt.spec.in (%post client): Silence chkconfig warning about
SysV services.
(%post) [with_cgconfig]: Drop for Fedora 15 and newer, where
systemd does this automatically.
上级 43c2641c
...@@ -894,10 +894,14 @@ done ...@@ -894,10 +894,14 @@ done
%endif %endif
%if %{with_cgconfig} %if %{with_cgconfig}
# Starting with Fedora 15, systemd automounts all cgroups, and cgconfig is
# no longer a necessary service.
%if 0%{?fedora} <= 14 || 0%{?rhel} <= 6
if [ "$1" -eq "1" ]; then if [ "$1" -eq "1" ]; then
/sbin/chkconfig cgconfig on /sbin/chkconfig cgconfig on
fi fi
%endif %endif
%endif
/sbin/chkconfig --add libvirtd /sbin/chkconfig --add libvirtd
if [ "$1" -ge "1" ]; then if [ "$1" -ge "1" ]; then
...@@ -926,7 +930,8 @@ fi ...@@ -926,7 +930,8 @@ fi
/sbin/chkconfig --add libvirt-guests /sbin/chkconfig --add libvirt-guests
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2) level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2)
if /sbin/chkconfig --list libvirt-guests | /bin/grep -q $level:on ; then if /sbin/chkconfig --list libvirt-guests 2>/dev/null \
| /bin/grep -q $level:on ; then
# this doesn't do anything but allowing for libvirt-guests to be # this doesn't do anything but allowing for libvirt-guests to be
# stopped on the first shutdown # stopped on the first shutdown
/sbin/service libvirt-guests start > /dev/null 2>&1 || true /sbin/service libvirt-guests start > /dev/null 2>&1 || true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册