POSTIN
/bin/sh
# Any and all upgrades/installs should remove all old dangling alternatives
# links except for the one case of openmpi-1.2.3 still installed because
# its %preun will fail if it can't remove the alternatives link itself.
# So, remove the link, and if 1.2.3 is installed, put it back.
/usr/sbin/alternatives --remove mpi-run /usr/bin/orterun >/dev/null 2>&1
rpm -q openmpi-1.2.3.i386 >/dev/null 2>&1
if [ "$?" -eq 0 ]; then
# 1.2.3 is installed, recreate the link
/usr/sbin/alternatives --install /usr/bin/mpirun mpi-run \
/usr/bin/orterun 11 >/dev/null 2>&1
fi
# We can't fail
/bin/true