1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
|
Name: hpiutil
%define Version 1.1.11
Version: %Version
Release: 1
Summary: Contains HPI server management utilities and library.
License: BSD
Group: System/Management
Source: hpiutil-%Version.tar.gz
URL: http://ipmiutil.sourceforge.net
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: gcc
%ifarch x86_pentium3
AutoReqProv: No
%endif
%ifarch x86_pentium4
AutoReqProv: No
%endif
%description
The HPI utilities package provides system management utilities that
conform to the SA Forum's Hardware Platform Interface specification, and
as such are hardware-independent across platforms that have an HPI
library implementation. The HPI library on Intel platforms requires
an IPMI driver. An IPMI driver can be provided by either the Intel
IPMI driver (/dev/imb) or the OpenIPMI driver (/dev/ipmi0) in Linux
kernel versions 2.4.20 and greater.
This package includes the HPI binary libraries and the following
HPI utilities.
hpisensor
hpisel
hpireset
hpiwdt
hpifru
hpialarmpanel
%prep
#%setup -q
#%build
#sh configure
#make
#%install
#RPM_BUILD_ROOT=`pwd`
#make DESTDIR=${RPM_BUILD_ROOT} install
#( cd ${RPM_BUILD_ROOT}/usr/man/man8; gzip -f *.8 )
%files
%defattr(0755,root,root)
/usr/bin/hpifru
/usr/bin/hpisensor
/usr/bin/hpialarmpanel
/usr/bin/hpisel
/usr/bin/hpiwdt
/usr/bin/hpireset
/usr/bin/SpiLibd
/usr/lib/libSaHpi.so
/usr/lib/libSpiDaemonCore.so
/usr/lib/libSpiModGeneric.so
/usr/lib/libSpiModIpmi.so
/usr/lib/libSpiModIpmi.so-open
/usr/lib/libSpiIpmiImb.so
/usr/lib/libSpiIpmiOpenIpmi.so
/usr/lib/libSpiTsdMaplx.so
/etc/hpi/hpiinit.sh
/usr/share/hpiutil/env.hpi
%defattr(0664,root,root)
/usr/share/hpiutil/README
/usr/share/hpiutil/COPYING
/etc/hpi/spi-daemon.conf
/etc/hpi/spi-lib.conf
# %defattr(-,root,root)
# %doc README TODO COPYING ChangeLog
%pre
# before install
sdir=/usr/share/hpiutil
edir=/etc/hpi
echo "Installing HPI Utilities ..."
mkdir -p $sdir
mkdir -p $edir
# Check for an IPMI driver
rpm -qa |grep ipmidrvr >/dev/null
if [ $? -ne 0 ]
then
# Intel ipmidrvr package is not installed, but other IPMI drivers
# could also be used, so test for device files.
dev1=/dev/imb
dev2=/dev/ipmi0
dev3=/dev/ipmi/0
dev4=/dev/ipmikcs
if [ ! -c $dev1 ]
then
if [ ! -c $dev2 ]
then
if [ ! -c $dev3 ]
then
echo "WARNING: No IPMI devices found ($dev1, $dev2 or $dev3)."
echo "The HPI utilities depend on an IPMI driver. "
fi
fi
fi
fi
%post
# after install
sdir=/usr/share/hpiutil
edir=/etc/hpi
echo "hpiutil install started `date`"
# Assumes that the kernel modules are already in place.
# The spi-daemon.conf file should have 'localhost' as the
# server name. User can modify this if remote.
# set up the init.d jobs
loadhpi=/etc/hpi/hpiinit.sh
if [ -d /etc/rc.d/init.d ]
then
# RedHat init.d structure
cd /etc/rc.d/init.d
cp $loadhpi ./hpi
echo "To autostart hpi, enter: chkconfig --add hpi"
# chkconfig --add hpi
# Or manually create links
# cd ../rc3.d
# ln -s ../init.d/hpi S81hpi 2>/dev/null
# ln -s ../init.d/hpi K35hpi 2>/dev/null
# cd ../rc5.d
# ln -s ../init.d/hpi S81hpi 2>/dev/null
# ln -s ../init.d/hpi K35hpi 2>/dev/null
# cd ../rc6.d
# ln -s ../init.d/hpi K35hpi 2>/dev/null
# cd ../rc0.d
# ln -s ../init.d/hpi K35hpi 2>/dev/null
else
# SuSE init.d structure
cd /etc/init.d
cp $loadhpi ./hpi
echo "To autostart hpi, enter: /usr/lib/lsb/install_initd /etc/init.d/hpi "
# /usr/lib/lsb/install_initd /etc/init.d/hpi
# Or manually create links
# cd rc3.d
# ln -s ../hpi S81hpi 2>/dev/null
# ln -s ../hpi K35hpi 2>/dev/null
# cd ../rc5.d
# ln -s ../hpi S81hpi 2>/dev/null
# ln -s ../hpi K35hpi 2>/dev/null
# cd ../rc6.d
# ln -s ../hpi K35hpi 2>/dev/null
# cd ../rc0.d
# ln -s ../hpi K35hpi 2>/dev/null
fi
echo "done `date`"
%preun
# before uninstall
echo "Uninstalling HPI Utilities feature ..."
/etc/hpi/hpiinit.sh stop 2>/dev/null
%postun
# after uninstall, clean up anything left over
sdir=/usr/share/hpiutil
edir=/etc/hpi
tmped=/tmp/edmk.tmp
if [ -d /etc/rc.d/init.d ]
then
# RedHat init.d structure
# chkconfig --del hpi
cd /etc/rc.d/init.d
rm -f hpi ../rc?.d/S81hpi ../rc?.d/K35hpi
else
# SuSE init.d structure
# /usr/lib/lsb/remove_initd /etc/init.d/hpi
cd /etc/init.d
rm -f hpi rc?.d/S81hpi rc?.d/K35hpi
fi
rm -rf $sdir 2>/dev/null
%changelog
* Tue Apr 06 2004 Andrew Cress <arcress at users.sourceforge.net>
changed to not turn on hpi autostart scripts at rpm install
* Fri Mar 26 2004 Andrew Cress <arcress at users.sourceforge.net>
- changed to include proper kill scripts and chkconfig info
* Thu Feb 12 2004 Andrew Cress <arcress at users.sourceforge.net>
- changed naming from /etc/init.d/hpiinit.sh to /etc/init.d/hpi
* Fri Jun 27 2003 Andrew Cress <arcress at users.sourceforge.net>
- updated to check for ipmidrvr rpm, since no /dev/imb until reboot.
* Fri Jun 20 2003 Andrew Cress <arcress at users.sourceforge.net>
- updated for README & released file locations
* Thu Jun 12 2003 Andrew Cress <arcress at users.sourceforge.net>
- updated for beta2 file naming
* Tue May 05 2003 Andrew Cress <arcress at users.sourceforge.net>
- created
|