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