PREIN
/bin/sh
usermod -a -G qemu nova
# Add nova to the fuse group (if present) to support guestmount
if getent group fuse >/dev/null; then
usermod -a -G fuse nova
fi
exit 0
PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
for svc in compute; do
/bin/systemctl --no-reload disable openstack-nova-${svc}.service > /dev/null 2>&1 || :
/bin/systemctl stop openstack-nova-${svc}.service > /dev/null 2>&1 || :
done
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
POSTUN
/bin/sh
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in compute; do
/bin/systemctl try-restart openstack-nova-${svc}.service >/dev/null 2>&1 || :
done
fi