Fixes spec file to make sure all the server instances are stopped before upgrade
- Ticket 48030 - DNS errors after IPA upgrade due to broken ReplSync
This commit is contained in:
parent
ca094d38b7
commit
392f7da4c4
@ -25,7 +25,7 @@
|
||||
Summary: 389 Directory Server (base)
|
||||
Name: 389-ds-base
|
||||
Version: 1.3.3.8
|
||||
Release: %{?relprefix}1%{?prerel}%{?dist}
|
||||
Release: %{?relprefix}2%{?prerel}%{?dist}
|
||||
License: GPLv2 with exceptions
|
||||
URL: http://port389.org/
|
||||
Group: System Environment/Daemons
|
||||
@ -216,35 +216,44 @@ ninst=0 # number of instances found in total
|
||||
if [ -n "$DEBUGPOSTTRANS" ] ; then
|
||||
output=$DEBUGPOSTTRANS
|
||||
fi
|
||||
echo looking for services in %{_sysconfdir}/systemd/system/%{groupname}.wants/* > $output 2>&1 || :
|
||||
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 found instance $inst - getting status >> $output 2>&1 || :
|
||||
if /bin/systemctl -q is-active $inst ; then
|
||||
echo instance $inst is running > $output 2>&1 || :
|
||||
echo instance $inst is running >> $output 2>&1 || :
|
||||
instances="$instances $inst"
|
||||
else
|
||||
echo instance $inst is not running > $output 2>&1 || :
|
||||
echo instance $inst is not running >> $output 2>&1 || :
|
||||
fi
|
||||
ninst=`expr $ninst + 1`
|
||||
done
|
||||
if [ $ninst -eq 0 ] ; then
|
||||
echo no instances to upgrade > $output 2>&1 || :
|
||||
echo no instances to upgrade >> $output 2>&1 || :
|
||||
exit 0 # have no instances to upgrade - just skip the rest
|
||||
fi
|
||||
# shutdown all instances
|
||||
echo shutting down all instances . . . > $output 2>&1 || :
|
||||
/bin/systemctl stop %{groupname} > $output 2>&1 || :
|
||||
echo remove pid files . . . > $output 2>&1 || :
|
||||
echo shutting down all instances . . . >> $output 2>&1 || :
|
||||
for inst in $instances ; do
|
||||
echo stopping instance $inst >> $output 2>&1 || :
|
||||
/bin/systemctl stop $inst >> $output 2>&1 || :
|
||||
done
|
||||
echo remove pid files . . . >> $output 2>&1 || :
|
||||
/bin/rm -f /var/run/%{pkgname}*.pid /var/run/%{pkgname}*.startpid
|
||||
# do the upgrade
|
||||
echo upgrading instances . . . > $output 2>&1 || :
|
||||
%{_sbindir}/setup-ds.pl -l $output -u -s General.UpdateMode=offline > $output 2>&1 || :
|
||||
echo upgrading instances . . . >> $output 2>&1 || :
|
||||
DEBUGPOSTSETUPOPT=`/usr/bin/echo $DEBUGPOSTSETUP | /usr/bin/sed -e "s/[^d]//g"`
|
||||
if [ -n "$DEBUGPOSTSETUPOPT" ] ; then
|
||||
%{_sbindir}/setup-ds.pl -l $output -$DEBUGPOSTSETUPOPT -u -s General.UpdateMode=offline >> $output 2>&1 || :
|
||||
else
|
||||
%{_sbindir}/setup-ds.pl -l $output -u -s General.UpdateMode=offline >> $output 2>&1 || :
|
||||
fi
|
||||
|
||||
# restart instances that require it
|
||||
for inst in $instances ; do
|
||||
echo restarting instance $inst > $output 2>&1 || :
|
||||
/bin/systemctl start $inst > $output 2>&1 || :
|
||||
echo restarting instance $inst >> $output 2>&1 || :
|
||||
/bin/systemctl start $inst >> $output 2>&1 || :
|
||||
done
|
||||
exit 0
|
||||
|
||||
@ -305,6 +314,10 @@ fi
|
||||
%{_libdir}/%{pkgname}/libns-dshttpd.so*
|
||||
|
||||
%changelog
|
||||
* Wed Feb 25 2015 Noriko Hosoi <nhosoi@redhat.com> - 1.3.3.8-2
|
||||
- Fixes spec file to make sure all the server instances are stopped before upgrade
|
||||
- Ticket 48030 - DNS errors after IPA upgrade due to broken ReplSync
|
||||
|
||||
* Wed Feb 04 2015 Noriko Hosoi <nhosoi@redhat.com> - 1.3.3.8-1
|
||||
- bump version to 1.3.3.8
|
||||
- Ticket 48001 - ns-activate.pl fails to activate account if it was disabled on AD
|
||||
@ -319,7 +332,7 @@ fi
|
||||
* Wed Jan 28 2015 Noriko Hosoi <nhosoi@redhat.com> - 1.3.3.7-1
|
||||
- bump version to 1.3.3.7
|
||||
- Coverity 12970 - Explicit null dereference
|
||||
- Ticket 47988: Schema learning mechanism, in replication, unable to extend an existing definition
|
||||
- Ticket 47988 - Schema learning mechanism, in replication, unable to extend an existing definition
|
||||
- Ticket 47996 - ldclt needs to support SSL Version range
|
||||
- Ticket 47738 - use PL_strcasestr instead of strcasestr
|
||||
- Ticket 47462 - Stop using DES in the reversible password encryption plug-in
|
||||
|
||||
Loading…
Reference in New Issue
Block a user