MDEV-5579 rpm postun scriptlet leaks exit code to rpm

This commit is contained in:
Sergei Golubchik 2014-02-17 11:10:03 +01:00
parent 95f4bf1857
commit cb324d91ad

View File

@ -1,7 +1,8 @@
if [ $1 -ge 1 ]; then
if [ -x %{_sysconfdir}/init.d/mysql ] ; then
# only restart the server if it was alredy running
%{_sysconfdir}/init.d/mysql status > /dev/null 2>&1 && \
%{_sysconfdir}/init.d/mysql restart
if %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1; then
%{_sysconfdir}/init.d/mysql restart
fi
fi
fi