summaryrefslogtreecommitdiff
path: root/doc/ipmiutil.spec
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-05-08 23:32:28 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-05-08 23:32:28 +0200
commit55adddbc16f65732b57ab8585c47001fced91d77 (patch)
tree27e8239d48c8a6b353db356aff92ee4d225c0a0e /doc/ipmiutil.spec
parentd3c90cdcdf56146af89056ed36bfcc7b4d4956c5 (diff)
Imported Upstream version 2.9.9upstream/2.9.9
Diffstat (limited to 'doc/ipmiutil.spec')
-rw-r--r--doc/ipmiutil.spec32
1 files changed, 20 insertions, 12 deletions
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