unify systemctl binary paths throughout the specfile and make them usrmove compliant
make path to chkconfig binary usrmove compliant
This commit is contained in:
parent
d5cbb774ed
commit
f25689a388
@ -4,9 +4,11 @@
|
|||||||
%global evolution_connector_includedir %{evolution_connector_prefix}/include
|
%global evolution_connector_includedir %{evolution_connector_prefix}/include
|
||||||
%global evolution_connector_libdir %{evolution_connector_prefix}/%{_lib}
|
%global evolution_connector_libdir %{evolution_connector_prefix}/%{_lib}
|
||||||
|
|
||||||
|
%global systemctl_bin /usr/bin/systemctl
|
||||||
|
|
||||||
Name: openldap
|
Name: openldap
|
||||||
Version: 2.4.29
|
Version: 2.4.29
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: LDAP support libraries
|
Summary: LDAP support libraries
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
License: OpenLDAP
|
License: OpenLDAP
|
||||||
@ -426,7 +428,7 @@ exit 0
|
|||||||
|
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
# initial installation
|
# initial installation
|
||||||
/bin/systemctl daemon-reload &>/dev/null || :
|
%{systemctl_bin} daemon-reload &>/dev/null || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# generate sample TLS certificate for server (will not replace)
|
# generate sample TLS certificate for server (will not replace)
|
||||||
@ -446,8 +448,8 @@ start_slapd=0
|
|||||||
|
|
||||||
# upgrade the database
|
# upgrade the database
|
||||||
if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap ]; then
|
if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_openldap ]; then
|
||||||
if /bin/systemctl --quiet is-active slapd.service; then
|
if %{systemctl_bin} --quiet is-active slapd.service; then
|
||||||
/bin/systemctl stop slapd.service
|
%{systemctl_bin} stop slapd.service
|
||||||
start_slapd=1
|
start_slapd=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -483,9 +485,9 @@ fi
|
|||||||
# restart after upgrade
|
# restart after upgrade
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
if [ $start_slapd -eq 1 ]; then
|
if [ $start_slapd -eq 1 ]; then
|
||||||
/bin/systemctl start slapd.service &>/dev/null || :
|
%{systemctl_bin} start slapd.service &>/dev/null || :
|
||||||
else
|
else
|
||||||
/bin/systemctl condrestart slapd.service &>/dev/null || :
|
%{systemctl_bin} condrestart slapd.service &>/dev/null || :
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -494,17 +496,17 @@ exit 0
|
|||||||
%preun servers
|
%preun servers
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
# package removal
|
# package removal
|
||||||
/bin/systemctl --no-reload disable slapd.service &>/dev/null || :
|
%{systemctl_bin} --no-reload disable slapd.service &>/dev/null || :
|
||||||
/bin/systemctl stop slapd.service &>/dev/null || :
|
%{systemctl_bin} stop slapd.service &>/dev/null || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun servers
|
%postun servers
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
/bin/systemctl daemon-reload &>/dev/null || :
|
%{systemctl_bin} daemon-reload &>/dev/null || :
|
||||||
if [ $1 -ge 1 ]; then
|
if [ $1 -ge 1 ]; then
|
||||||
# package upgrade
|
# package upgrade
|
||||||
/bin/systemctl try-restart slapd.service &>/dev/null || :
|
%{systemctl_bin} try-restart slapd.service &>/dev/null || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
@ -520,8 +522,8 @@ exit 0
|
|||||||
|
|
||||||
# migration from SysV to systemd
|
# migration from SysV to systemd
|
||||||
/usr/bin/systemd-sysv-convert --save slapd &>/dev/null || :
|
/usr/bin/systemd-sysv-convert --save slapd &>/dev/null || :
|
||||||
/sbin/chkconfig --del slapd &>/dev/null || :
|
/usr/sbin/chkconfig --del slapd &>/dev/null || :
|
||||||
/bin/systemctl try-restart slapd.service &>/dev/null || :
|
%{systemctl_bin} try-restart slapd.service &>/dev/null || :
|
||||||
|
|
||||||
|
|
||||||
%triggerin servers -- libdb
|
%triggerin servers -- libdb
|
||||||
@ -543,8 +545,8 @@ exit 0
|
|||||||
|
|
||||||
# libdb upgrade (finish %%triggerin)
|
# libdb upgrade (finish %%triggerin)
|
||||||
if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb ]; then
|
if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb ]; then
|
||||||
if /bin/systemctl --quiet is-active slapd.service; then
|
if %{systemctl_bin} --quiet is-active slapd.service; then
|
||||||
/bin/systemctl stop slapd.service
|
%{systemctl_bin} stop slapd.service
|
||||||
start=1
|
start=1
|
||||||
else
|
else
|
||||||
start=0
|
start=0
|
||||||
@ -553,7 +555,7 @@ if [ -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb ]; then
|
|||||||
%{_libexecdir}/openldap/upgrade-db.sh &>/dev/null
|
%{_libexecdir}/openldap/upgrade-db.sh &>/dev/null
|
||||||
rm -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb
|
rm -f %{_sharedstatedir}/ldap/rpm_upgrade_libdb
|
||||||
|
|
||||||
[ $start -eq 1 ] && /bin/systemctl start slapd.service &>/dev/null
|
[ $start -eq 1 ] && %{systemctl_bin} start slapd.service &>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
@ -649,6 +651,10 @@ exit 0
|
|||||||
%{evolution_connector_prefix}/
|
%{evolution_connector_prefix}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 20 2012 Jan Synáček <jsynacek@redhat.com> - 2.4.29-2
|
||||||
|
- unify systemctl binary paths throughout the specfile and make them usrmove compliant
|
||||||
|
- make path to chkconfig binary usrmove compliant
|
||||||
|
|
||||||
* Wed Feb 15 2012 Jan Vcelak <jvcelak@redhat.com> 2.4.29-1
|
* Wed Feb 15 2012 Jan Vcelak <jvcelak@redhat.com> 2.4.29-1
|
||||||
- new upstream release
|
- new upstream release
|
||||||
+ MozNSS fixes
|
+ MozNSS fixes
|
||||||
|
Loading…
Reference in New Issue
Block a user