convert to systemd
This commit is contained in:
parent
f3dbb8c393
commit
3938dcea8f
10
ipmievd.service
Normal file
10
ipmievd.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Ipmievd Daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=-/etc/sysconfig/ipmievd
|
||||
ExecStart=/usr/sbin/ipmievd $IPMIEVD_OPTIONS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,16 +1,19 @@
|
||||
Name: ipmitool
|
||||
Summary: Utility for IPMI control
|
||||
Version: 1.8.11
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: BSD
|
||||
Group: System Environment/Base
|
||||
URL: http://ipmitool.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
||||
Source1: openipmi-ipmievd.sysconf
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Source2: ipmievd.service
|
||||
BuildRequires: openssl-devel readline-devel ncurses-devel
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
BuildRequires: systemd-units
|
||||
Requires(post): systemd-sysv
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
Obsoletes: OpenIPMI-tools < 2.0.14-3
|
||||
Provides: OpenIPMI-tools = 2.0.14-3
|
||||
|
||||
@ -52,33 +55,44 @@ done
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make DESTDIR=%{buildroot} install
|
||||
|
||||
install -Dpm 755 contrib/ipmievd.init.redhat %{buildroot}%{_initrddir}/ipmievd
|
||||
install -Dpm 644 ipmievd.service %{buildroot}%{_unitdir}/ipmievd.service
|
||||
install -Dpm 644 %SOURCE1 %{buildroot}%{_sysconfdir}/sysconfig/ipmievd
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add ipmievd
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
service ipmievd stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del ipmievd
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable ipmievd.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop ipmievd.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ "$1" -ge "1" ]; then
|
||||
service ipmievd condrestart >/dev/null 2>&1 || :
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart ipmievd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%triggerun -- ipmievd < 1.8.11-7
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply ipmievd
|
||||
# to migrate them to systemd targets
|
||||
/usr/bin/systemd-sysv-convert --save ipmievd >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del ipmievd >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart ipmievd.service >/dev/null 2>&1 || :
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/ipmievd
|
||||
%{_initrddir}/ipmievd
|
||||
%{_unitdir}/ipmievd.service
|
||||
%{_bindir}/*
|
||||
%{_sbindir}/*
|
||||
%{_mandir}/man*/*
|
||||
@ -87,6 +101,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Sep 12 2011 Tom Callaway <spot@fedoraproject.org> - 1.8.11-7
|
||||
- convert to systemd
|
||||
|
||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.11-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user