Revise server upgrade logic

This commit is contained in:
Mark Reynolds 2017-06-06 11:25:58 -04:00
parent 65737a6c10
commit fde90d9f6e

View File

@ -33,7 +33,7 @@
Summary: 389 Directory Server (base)
Name: 389-ds-base
Version: 1.3.6.6
Release: %{?relprefix}3%{?prerel}%{?dist}.1
Release: %{?relprefix}3%{?prerel}%{?dist}.22
License: GPLv3+
URL: http://www.port389.org
Group: System Environment/Daemons
@ -340,11 +340,15 @@ if ! getent passwd $USERNAME >/dev/null ; then
fi
fi
echo looking for services in %{_sysconfdir}/systemd/system/%{groupname}.wants/* >> $output 2>&1 || :
for service in %{_sysconfdir}/systemd/system/%{groupname}.wants/* ; do
if [ ! -f "$service" ] ; then continue ; fi # in case nothing matches
inst=`echo $service | sed -e 's,%{_sysconfdir}/systemd/system/%{groupname}.wants/,,'`
echo found instance $inst - getting status >> $output 2>&1 || :
echo looking for instances in %{_sysconfdir}/%{pkgname} > $output 2>&1 || :
instbase="%{_sysconfdir}/%{pkgname}"
for dir in $instbase/slapd-* ; do
echo dir = $dir >> $output 2>&1 || :
if [ ! -d "$dir" ] ; then continue ; fi
case "$dir" in *.removed) continue ;; esac
basename=`basename $dir`
inst="%{pkgname}@`echo $basename | sed -e 's/slapd-//g'`"
echo found instance $inst - getting status >> $output 2>&1 || :
if /bin/systemctl -q is-active $inst ; then
echo instance $inst is running >> $output 2>&1 || :
instances="$instances $inst"
@ -468,6 +472,9 @@ fi
%{python3_sitelib}/*
%changelog
* Tue Jun 6 2017 Mark Reynolds <mreynolds@redhat.com> - 1.3.6.6-3.2
- Revise server upgrade logic
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.3.6.6-3.1
- Perl 5.26 rebuild