summaryrefslogtreecommitdiff
path: root/doc/ipmiutil.spec
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ipmiutil.spec')
-rw-r--r--doc/ipmiutil.spec60
1 files changed, 35 insertions, 25 deletions
diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec
index c6c39c2..7551bb2 100644
--- a/doc/ipmiutil.spec
+++ b/doc/ipmiutil.spec
@@ -3,7 +3,7 @@
# Copyright (c) 2012 Andy Cress
#
Name: ipmiutil
-Version: 3.0.7
+Version: 3.0.8
Release: 1%{?dist}
Summary: Easy-to-use IPMI server management utilities
License: BSD
@@ -12,37 +12,33 @@ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
URL: http://ipmiutil.sourceforge.net
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# Suggests: cron or vixie-cron or cronie or similar
-%if 0%{?sles_version} >= 10
-%define bldreq0 libopenssl-devel
-%else
-%define bldreq0 openssl-devel
-%endif
+%{!?_unitdir: %define _unitdir /usr/lib/systemd/system}
+%define unit_dir %{_unitdir}
+%define init_dir %{_initrddir}
+%define systemd_fls %{_datadir}/%{name}
+%define bldreq0 openssl-devel
+%define bldreq_extra gcc gcc-c++ libtool
%if 0%{?fedora} >= 15
%define bldreq_extra systemd autoconf automake systemd-units
Requires: systemd-units
Group: System Environment/Base
+%if 0%{?fedora} == 16
+%define unit_dir /lib/systemd/system
+%endif
%endif
%if 0%{?rhel} >= 7
%define bldreq_extra autoconf automake systemd-units
%endif
+%if 0%{?sles_version} > 10
+%define bldreq0 libopenssl-devel
+%endif
%if 0%{?suse_version} >= 1210
%define bldreq_extra gcc gcc-c++ libtool systemd
%define req_systemd 1
-%define unit_dir %{_unitdir}
%define systemd_fls %{unit_dir}
# Requires: %{?systemd_requires}
-%else
-%define bldreq_extra gcc gcc-c++ libtool
-%define systemd_fls %{_datadir}/%{name}
-%if 0%{?fedora} == 16
-%define unit_dir /lib/systemd/system
-%else
-%{!?_unitdir: %define _unitdir /usr/lib/systemd/system}
-%define unit_dir %{_unitdir}
-%endif
%endif
BuildRequires: %{bldreq0} %{bldreq_extra}
-%define init_dir %{_initrddir}
%description
The ipmiutil package provides easy-to-use utilities to view the SEL,
@@ -59,6 +55,7 @@ detected, ipmiutil will use user-space direct I/Os instead.
%package devel
Group: Development/Libraries
Summary: Includes libraries and headers for the ipmiutil package
+Requires: ipmiutil
%description devel
The ipmiutil-devel package contains headers and libraries which are
@@ -194,6 +191,9 @@ rm -rf %{buildroot}
%post devel
/sbin/ldconfig
+%postun devel
+/sbin/ldconfig
+
%pre
%if 0%{?req_systemd}
%service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
@@ -229,14 +229,19 @@ then
# 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.
- # 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
+ which dmidecode >/dev/null 2>&1 && IPMIret=0
if [ $IPMIret -eq 0 ]; then
+ IPMIret=1
+ %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0
+ if [ $IPMIret -eq 0 ]; then
+ # Run some ipmiutil command to see if any IPMI interface works.
+ # Some may not have IPMI on the motherboard, so need to check, but
+ # some kernels may have IPMI driver partially loaded, which breaks this
+ IPMIret=1
+ %{_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
+ 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
@@ -263,15 +268,20 @@ then
rm -f $sensorout
fi
fi
+ fi
+ fi
fi
else
# postinstall, doing rpm update
- IPMIret=0
- %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || IPMIret=1
+ IPMIret=1
+ which dmidecode >/dev/null 2>&1 && IPMIret=0
if [ $IPMIret -eq 0 ]; then
+ %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0
+ if [ $IPMIret -eq 0 ]; then
if [ -d %{_sysconfdir}/cron.daily ]; then
cp -f %{_datadir}/%{name}/checksel %{_sysconfdir}/cron.daily
fi
+ fi
fi
fi
%if 0%{?fedora} >= 18