summaryrefslogtreecommitdiff
path: root/doc/ipmiutil.spec
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ipmiutil.spec')
-rw-r--r--doc/ipmiutil.spec13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec
index c6b4db2..2d9d4af 100644
--- a/doc/ipmiutil.spec
+++ b/doc/ipmiutil.spec
@@ -3,7 +3,7 @@
# Copyright (c) 2012 Andy Cress
#
Name: ipmiutil
-Version: 3.1.9
+Version: 3.2.1
Release: 1%{?dist}
Summary: Easy-to-use IPMI server management utilities
License: BSD
@@ -203,6 +203,9 @@ rm -rf %{buildroot}
%if 0%{?req_systemd}
%service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service
%endif
+if [ ! -f %{_datadir}/%{name}/ipmiutil.env ]; then
+ cp %{_datadir}/%{name}/ipmiutil.env.template %{_datadir}/%{name}/ipmiutil.env
+fi
%post
/sbin/ldconfig
@@ -217,9 +220,6 @@ scr_dir=%{_datadir}/%{name}
if [ -x /bin/systemctl ] && [ -d %{unit_dir} ]; then
# Replace if exists, append if not.
# Use # as the sed delimiter to prevent handling slash in the path.
- if [ ! -f %{_datadir}/%{name}/ipmiutil.env ]; then
- cp %{_datadir}/%{name}/ipmiutil.env.template %{_datadir}/%{name}/ipmiutil.env
- fi
grep -q 'IINITDIR' %{_datadir}/%{name}/ipmiutil.env \
&& sed -i 's#^IINITDIR=.*#IINITDIR=%{init_dir}#' %{_datadir}/%{name}/ipmiutil.env \
|| echo "IINITDIR=%{init_dir}" >> %{_datadir}/%{name}/ipmiutil.env
@@ -274,8 +274,9 @@ then
# Capture a snapshot of IPMI sensor data once now for later reuse.
sensorout=$vardir/sensor_out.txt
if [ ! -f $sensorout ]; then
- %{_bindir}/ipmiutil sensor -q >$sensorout || :
- if [ $? -ne 0 ]; then
+ IPMIret=1
+ %{_bindir}/ipmiutil sensor -q >$sensorout && IPMIret=0
+ if [ $IPMIret -ne 0 ]; then
# remove file if error, try again in ipmi_port on reboot.
rm -f $sensorout
fi