É possível impedir que o rabbitmq-server seja reiniciado durante a atualização do erlang?
Como sabemos durante a atualização do erlang, o script erlang-base.prerm será chamado.
Este script irá verificar se há algum outro serviço que dependa de erlang.
Se houver. ele tentará parar o serviço e iniciará quando a atualização do erlang for concluída.
case "$1" in
remove|upgrade)
echo -n "Searching for services which depend on erlang and should be stopped..."
# find all init scripts and packages they belong
inits=$(dpkg -S '/etc/init.d/*' 2>/dev/null | sed -e's:/etc/init.d/::')
# filter the list of the packages
packs=$(echo $inits | sed -e's/:[[:space:]]\+[^[:space:]]*//g' | sed -e's/ /\n/g' | sort -u)
# find packages, which depend on erlang
packs=$(dpkg -s $packs 2>/dev/null | egrep '^Package:|^Status:|^Depends' | awk '{if ($1 ~ /^Package:/) {package=$2;inst=0} else if ($0 ~ /^Status:.* installed$/) {inst=1} else if ((inst==1) && ($0 ~ /^Depends:.* erlang/)) {print package}}')
# construct services list from the packages
services=""
for p in $packs ; do
service=$(echo $inits | sed -e's/\([^:]\) /\n/g' | awk "/^$p:/ {print \}")
services="$services $service"
done
services=$(echo $services | tr '\n' ' ' | sed -e's/\(^[[:space:]]*\|[[:space:]]*$\)//g')
if [ -z "$services" ] ; then
echo "none found."
else
echo "found: $services."
echo "Stopping services which depend on erlang"
rl=$(runlevel | awk '{print $2}')
failed=""
for service in $services ; do
if [ -f /usr/share/file-rc/rc -o -f /usr/lib/file-rc/rc ] && [ -f /etc/runlevel.conf ] ; then
idl=$(filerc $rl $service)
else
idl=$(ls /etc/rc${rl}.d/S??${service} 2> /dev/null | head -1)
fi
if [ -n "$idl" ] ; then
echo -n " $service: stopping..."
if $idl stop > /dev/null 2>&1 ; then
echo "done."
else
echo "failed. ($?)"
failed="$failed $service"
fi
fi
Existe alguma maneira de impedir que isso aconteça? Eu gostaria de reiniciar manualmente rabbitmq-server ..
Tags erlang