From 55adddbc16f65732b57ab8585c47001fced91d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 8 May 2016 23:32:28 +0200 Subject: Imported Upstream version 2.9.9 --- doc/ipmiutil.spec | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'doc/ipmiutil.spec') diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec index facb897..bff272f 100644 --- a/doc/ipmiutil.spec +++ b/doc/ipmiutil.spec @@ -3,7 +3,7 @@ # Copyright (c) 2012 Andy Cress # Name: ipmiutil -Version: 2.9.8 +Version: 2.9.9 Release: 1%{?dist} Summary: Easy-to-use IPMI server management utilities License: BSD @@ -13,30 +13,32 @@ URL: http://ipmiutil.sourceforge.net BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # Suggests: cron or vixie-cron or cronie or similar %if 0%{?fedora} >= 15 -BuildRequires: systemd autoconf automake +BuildRequires: systemd autoconf automake systemd-units Requires: systemd-units %endif -%if 0%{?suse_version} >= 1210 -%define req_systemd 1 -%endif %if 0%{?sles_version} >= 10 BuildRequires: libopenssl-devel %else BuildRequires: openssl-devel %endif -%if 0%{?req_systemd} +%if 0%{?suse_version} >= 1210 BuildRequires: gcc gcc-c++ libtool systemd +%define req_systemd 1 %define unit_dir %{_unitdir} %define systemd_fls %{unit_dir} # Requires: %{?systemd_requires} %else BuildRequires: gcc gcc-c++ libtool +%define systemd_fls %{_datadir}/%{name} %if 0%{?fedora} == 16 %define unit_dir /lib/systemd/system %else +%if 0%{?rhel} >= 7 +BuildRequires: systemd-units %define unit_dir %{_unitdir} %endif -%define systemd_fls %{_datadir}/%{name} +%{!?unit_dir: %define unit_dir /usr/lib/systemd/system} +%endif %endif %define init_dir %{_initrddir} @@ -213,11 +215,17 @@ then fi %endif + # Test whether an IPMI interface is known to the motherboard + IPMIret=1 + %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0 # Run some ipmiutil command to see if any IPMI interface works. - IPMIret=0 - %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || IPMIret=1 - # If IPMIret==0, the IPMI cmd was successful, and IPMI is enabled locally. + # Some may not have IPMI on the motherboard, so need to check, but + # some kernels may have IPMI driver partially loaded, which breaks this + %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 && IPMIret=0 if [ $IPMIret -eq 0 ]; then + if [ ! -x %{init_dir}/ipmi ]; then + cp -f %{scr_dir}/ipmi.init.basic %{init_dir}/ipmi + fi # If IPMI is enabled, automate managing the IPMI SEL if [ -d %{_sysconfdir}/cron.daily ]; then cp -f %{_datadir}/%{name}/checksel %{_sysconfdir}/cron.daily @@ -228,9 +236,9 @@ then touch ${scr_dir}/ipmi_port.service elif [ -x /sbin/chkconfig ]; then /sbin/chkconfig --add ipmi_port - /sbin/chkconfig --add ipmiutil_wdt - /sbin/chkconfig --add ipmiutil_evt /sbin/chkconfig --add ipmi_info + # /sbin/chkconfig --add ipmiutil_wdt + # /sbin/chkconfig --add ipmiutil_evt fi fi -- cgit v1.2.3