TT#32220 Cleanup related with permanent use of "policy-rc.d" and migration to systemd

For a long time our installation and upgrade uses a temporary "policy-rc.d" to
prevent to [re]start services in the middle of the installation, so some uses of
"invoke-rc.d" (which defers to "policy-rc.d") can cause changes in behaviour.

Upon review because of this change, we found out that the restart of kamailio
when updating ngcp-db-schema didn't happen for a long time because of the use of
"policy-rc.d" that we were using during installations of upgrades in the last
few months/years, but besides this, the code is obsolete since quite a while
ago.

So we drop it completely now.

Change-Id: I76eae2fbda340a1021f10d28f95e76b35ea92c90
changes/53/18853/2
Manuel Montecelo 8 years ago
parent 237e2371f2
commit 2c4e127da2

@ -1,36 +0,0 @@
#!/bin/sh
set -e
case "$1" in
configure)
# apply bugfix on 2.6 ngcp systems with broken db rev script
# /usr/share/ngcp-db-schema/db_scripts/diff/9868.up
# ngcp 2.5 repos provides ngcp-db-schema := 0.1.3
# ngcp 2.6 repos provides ngcp-db-schema >= 2.6.3
if [ -n "$2" ] && dpkg --compare-versions "$2" ge 2.6.0 && dpkg --compare-versions "$2" le 2.6.4 ; then
echo "Executing ngcp-update-db-schema to address 2.6 db rev script bug."
ngcp-update-db-schema
if /etc/init.d/kamailio-proxy status >/dev/null ; then
if [ -x "$(which invoke-rc.d 2>/dev/null)" ]; then
echo "Restarting kamailio proxy to handle db changes"
invoke-rc.d kamailio-proxy restart || exit $?
else
echo "Restarting kamailio proxy to handle db changes"
/etc/init.d/kamailio-proxy restart || exit $?
fi
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst of ngcp-db-schema called with unknown argument \`$1'" >&2
exit 1
;;
esac
exit 0
Loading…
Cancel
Save