2 # postrm script for browser-switchboard
4 # see: dh_installdeb(1)
8 # summary of how this script can be called:
11 # * <old-postrm> `upgrade' <new-version>
12 # * <new-postrm> `failed-upgrade' <old-version>
13 # * <new-postrm> `abort-install'
14 # * <new-postrm> `abort-install' <old-version>
15 # * <new-postrm> `abort-upgrade' <old-version>
16 # * <disappearer's-postrm> `disappear' <overwriter>
17 # <overwriter-version>
18 # for details, see http://www.debian.org/doc/debian-policy/ or
19 # the debian-policy package
22 # Kill off browser-switchboards
23 # This would be so much nicer with pgrep/pkill ...
24 proxy_pids=`busybox ps | fgrep browser-switchboard | fgrep -v grep | fgrep -v browser-switchboard.postrm | awk '{ print $1 }'`
25 if [ ! -z "$proxy_pids" ]; then
32 dpkg-divert --remove --package browser-switchboard --rename \
33 --divert /usr/bin/browser.tablet-browser-ui \
35 dpkg-divert --remove --package browser-switchboard --rename \
36 --divert /usr/share/dbus-1/services/com.nokia.osso_browser.tablet-browser-ui \
37 /usr/share/dbus-1/services/com.nokia.osso_browser.service
38 # Try to make dbus-daemon pick up the change in services file
39 kill -HUP `pidof dbus-daemon`
41 # Kill off any running browser-switchboard to make sure that the
42 # default browser gets launched
46 # Kill off any running browser-switchboard to make sure that the new
47 # version gets launched the next time a D-Bus request is made
50 purge|failed-upgrade|abort-install|abort-upgrade)
54 echo "postrm called with unknown argument \`$1'" >&2
59 # dh_installdeb will replace this with shell code automatically
60 # generated by other debhelper scripts.