Scritping changes to manage the service with systemd
This commit is contained in:
parent
02eb3d99ed
commit
0ccae6251f
|
@ -8,7 +8,7 @@ Name: sblim-sfcb
|
||||||
Summary: Small Footprint CIM Broker
|
Summary: Small Footprint CIM Broker
|
||||||
URL: http://www.sblim.org
|
URL: http://www.sblim.org
|
||||||
Version: 1.3.10
|
Version: 1.3.10
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
License: EPL
|
License: EPL
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
|
||||||
|
@ -27,6 +27,10 @@ BuildRequires: openssl-devel
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: cim-schema
|
BuildRequires: cim-schema
|
||||||
BuildRequires: bison flex
|
BuildRequires: bison flex
|
||||||
|
Requires(post): systemd-units
|
||||||
|
Requires(preun): systemd-units
|
||||||
|
Requires(postun): systemd-units
|
||||||
|
Requires(triggerun): systemd-units
|
||||||
|
|
||||||
%Description
|
%Description
|
||||||
Small Footprint CIM Broker (sfcb) is a CIM server conforming to the
|
Small Footprint CIM Broker (sfcb) is a CIM server conforming to the
|
||||||
|
@ -99,18 +103,32 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_datadir}/sfcb/genSslCert.sh %{_sysconfdir}/sfcb &>/dev/null || :
|
%{_datadir}/sfcb/genSslCert.sh %{_sysconfdir}/sfcb &>/dev/null || :
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
%{_bindir}/sfcbrepos -f
|
%{_bindir}/sfcbrepos -f
|
||||||
/sbin/chkconfig --add sblim-sfcb
|
|
||||||
|
if [ $1 -eq 1 ]; then
|
||||||
|
# Package install, not upgrade
|
||||||
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%triggerun -- sblim-sfcb < 1.3.10-3
|
||||||
|
if /sbin/chkconfig sblim-sfcb ; then
|
||||||
|
/bin/systemctl enable sfcb.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 -eq 0 ] ; then
|
||||||
/sbin/service sblim-sfcb stop&>/dev/null
|
# Package removal, not upgrade
|
||||||
/sbin/chkconfig --del sblim-sfcb
|
/bin/systemctl disable sfcb.service > /dev/null 2>&1 || :
|
||||||
|
/bin/systemctl stop sfcb.service > /dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
if [ $1 -gt 1 ]; then
|
|
||||||
/sbin/service sblim-sfcb condrestart|try-restart &> /dev/null
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||||
|
if [ $1 -ge 1 ] ; then
|
||||||
|
# Package upgrade, not uninstall
|
||||||
|
/bin/systemctl try-restart sfcb.service >/dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%files -f _pkg_list
|
%files -f _pkg_list
|
||||||
|
@ -123,6 +141,9 @@ fi
|
||||||
#%doc COPYING README
|
#%doc COPYING README
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 7 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 1.3.10-3
|
||||||
|
- Added the required scripting to manage the service with systemd
|
||||||
|
|
||||||
* Fri Jan 7 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 1.3.10-2
|
* Fri Jan 7 2011 Praveen K Paladugu <praveen_paladugu@dell.com> - 1.3.10-2
|
||||||
- Following the BZ#660072, added sfcb.service file for compliance with systemd
|
- Following the BZ#660072, added sfcb.service file for compliance with systemd
|
||||||
- Since sfcb's PAM authentication requires, the user to be in group sfcb,
|
- Since sfcb's PAM authentication requires, the user to be in group sfcb,
|
||||||
|
|
Loading…
Reference in New Issue