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
|
Name: ipmitool
|
||||||
Summary: Utility for IPMI control
|
Summary: Utility for IPMI control
|
||||||
Version: 1.8.11
|
Version: 1.8.11
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://ipmitool.sourceforge.net/
|
URL: http://ipmitool.sourceforge.net/
|
||||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
||||||
Source1: openipmi-ipmievd.sysconf
|
Source1: openipmi-ipmievd.sysconf
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Source2: ipmievd.service
|
||||||
BuildRequires: openssl-devel readline-devel ncurses-devel
|
BuildRequires: openssl-devel readline-devel ncurses-devel
|
||||||
Requires(post): chkconfig
|
BuildRequires: systemd-units
|
||||||
Requires(preun): chkconfig
|
Requires(post): systemd-sysv
|
||||||
|
Requires(post): systemd-units
|
||||||
|
Requires(preun): systemd-units
|
||||||
|
Requires(postun): systemd-units
|
||||||
Obsoletes: OpenIPMI-tools < 2.0.14-3
|
Obsoletes: OpenIPMI-tools < 2.0.14-3
|
||||||
Provides: OpenIPMI-tools = 2.0.14-3
|
Provides: OpenIPMI-tools = 2.0.14-3
|
||||||
|
|
||||||
@ -52,33 +55,44 @@ done
|
|||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
|
||||||
make DESTDIR=%{buildroot} install
|
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
|
install -Dpm 644 %SOURCE1 %{buildroot}%{_sysconfdir}/sysconfig/ipmievd
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/chkconfig --add ipmievd
|
if [ $1 -eq 1 ] ; then
|
||||||
|
# Initial installation
|
||||||
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 -eq 0 ] ; then
|
||||||
service ipmievd stop >/dev/null 2>&1
|
# Package removal, not upgrade
|
||||||
/sbin/chkconfig --del ipmievd
|
/bin/systemctl --no-reload disable ipmievd.service > /dev/null 2>&1 || :
|
||||||
|
/bin/systemctl stop ipmievd.service > /dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
if [ "$1" -ge "1" ]; then
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
service ipmievd condrestart >/dev/null 2>&1 || :
|
if [ $1 -ge 1 ] ; then
|
||||||
|
# Package upgrade, not uninstall
|
||||||
|
/bin/systemctl try-restart ipmievd.service >/dev/null 2>&1 || :
|
||||||
fi
|
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
|
%files
|
||||||
%defattr(-,root,root)
|
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/ipmievd
|
%config(noreplace) %{_sysconfdir}/sysconfig/ipmievd
|
||||||
%{_initrddir}/ipmievd
|
%{_unitdir}/ipmievd.service
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
@ -87,6 +101,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user