Ensure the old agent binary gets stopped since the init script doesn't reference it (BZ##1024538)

epel9
Sam Kottler 11 years ago
parent f3709825f2
commit bfd9d58741

@ -301,6 +301,17 @@ exit 0
%if 0%{?_with_systemd}
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%else
# If there's a running puppet agent, restart it during upgrade. Fixes
# BZ #1024538.
if [ "$1" -ge 1 ]; then
pid="%{_localstatedir}/run/puppet/agent.pid"
if [ -e "$pid" ]; then
if ps aux | grep `cat "$pid"` | grep -v grep | awk '{ print $12 }' | grep -q sbin; then
(kill $(< "$pid") && rm -f "$pid" && \
/sbin/service puppet start) >/dev/null 2>&1 || :
fi
fi
fi
/sbin/chkconfig --add puppet || :
%endif

Loading…
Cancel
Save