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 old python browser-switchboards, if any
23 # This would be so much nicer with pgrep/pkill ...
24 proxy_pids=`busybox ps | fgrep "python /usr/bin/browser-switchboard" | fgrep -v grep | awk '{ print $1 }'`
25 if [ ! -z "$proxy_pids" ]; then
28 # Kill off C browser-switchboards
29 proxy_pids=`pidof browser-switchboard || true`
30 if [ ! -z "$proxy_pids" ]; then
37 dpkg-divert --remove --package browser-switchboard --rename \
38 --divert /usr/bin/browser.tablet-browser-ui \
40 dpkg-divert --remove --package browser-switchboard --rename \
41 --divert /usr/share/dbus-1/services/com.nokia.osso_browser.tablet-browser-ui \
42 /usr/share/dbus-1/services/com.nokia.osso_browser.service
43 # Try to make dbus-daemon pick up the change in services file
44 kill -HUP `pidof dbus-daemon`
46 # Kill off any running browser-switchboard to make sure that the
47 # default browser gets launched
51 # Kill off any running browser-switchboard to make sure that the new
52 # version gets launched the next time a D-Bus request is made
55 purge|failed-upgrade|abort-install|abort-upgrade)
59 echo "postrm called with unknown argument \`$1'" >&2
64 # dh_installdeb will replace this with shell code automatically
65 # generated by other debhelper scripts.