Public feed
#604229
preinstall scriptlet (using /bin/sh):
# If we upgrade, %pre is called first
# !!! order is %pre, %post, %preun, %postun !!!
if [ "$1" = "2" ]; then #1=install 2=upgrade 0=uninstall
# Try to stop exanodes, if it's impossible abort the upgrade process
echo "--- Trying to stop Exanodes during an upgrade ---"
/etc/init.d/exanodes status-cluster >/dev/null 2>&1;
if [ $? -ne 0 ]; then
echo "Exanodes is running on this node. Stop it first before upgrading."
exit 1;
fi
/etc/init.d/exanodes stop >/dev/null 2>&1;
if [ $? -ne 0 ]; then
echo "Error while stopping Exanodes, it is still running on this node."
exit 1;
fi
echo "-- Exanodes is stopped ---"
fi