#!/bin/sh set -e UPDATENOTIFIERDIR=/var/lib/update-notifier/user.d MOZ_LIBDIR=/@MOZ_LIBDIR@ MOZ_APP_NAME=@MOZ_APP_NAME@ finish_rm_conffile() { local CONFFILE="$1" if [ -e "$CONFFILE.dpkg-backup" ]; then mv -f "$CONFFILE.dpkg-backup" "$CONFFILE.dpkg-bak" fi if [ -e "$CONFFILE.dpkg-remove" ]; then echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE.dpkg-remove" fi } if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] ; then update-alternatives --install /usr/bin/gnome-www-browser \ gnome-www-browser /usr/bin/$MOZ_APP_NAME 40 update-alternatives --install /usr/bin/x-www-browser \ x-www-browser /usr/bin/$MOZ_APP_NAME 40 fi if [ "$1" = "configure" ] ; then APP_PROFILE="/etc/apparmor.d/usr.bin.$MOZ_APP_NAME" DISABLE_APP_PROFILE="/etc/apparmor.d/disable/usr.bin.$MOZ_APP_NAME" if [ ! -f "$DISABLE_APP_PROFILE" ] && [ -f "$APP_PROFILE" ] && aa-status --enabled 2>/dev/null; then apparmor_parser -r "$APP_PROFILE" || true fi finish_rm_conffile "/etc/${APP_NAME}/profile/bookmarks.html" finish_rm_conffile "/etc/${APP_NAME}/profile/localstore.rdf" finish_rm_conffile "/etc/${APP_NAME}/profile/mimeTypes.rdf" finish_rm_conffile "/etc/${APP_NAME}/profile/prefs.js" finish_rm_conffile "/etc/${APP_NAME}/profile/chrome/userChrome-example.css" finish_rm_conffile "/etc/${APP_NAME}/profile/chrome/userContent-example.css" if [ -d $MOZ_LIBDIR/distribution/extensions ] && [ ! -h $MOZ_LIBDIR/distribution/extensions ]; then \ rmdir --ignore-fail-on-non-empty $MOZ_LIBDIR/distribution/extensions fi if [ ! -e $MOZ_LIBDIR/distribution/extensions ]; then ln -s /usr/lib/$MOZ_APP_NAME-addons/distribution/extensions $MOZ_LIBDIR/distribution/extensions fi if [ -d $MOZ_LIBDIR/plugins ] && [ ! -h $MOZ_LIBDIR/plugins ]; then \ rmdir --ignore-fail-on-non-empty $MOZ_LIBDIR/plugins fi if [ ! -e $MOZ_LIBDIR/plugins ]; then ln -s /usr/lib/$MOZ_APP_NAME-addons/plugins $MOZ_LIBDIR/plugins fi fi echo "Please restart all running instances of $MOZ_APP_NAME, or you will experience problems." if [ -d $UPDATENOTIFIERDIR ] ; then # pgrep matches application names from /proc//status which is # truncated according to sys/procfs.h definition. Problem is it's # platform dependent. Either 15 or 16 chars. if [ `/usr/bin/pgrep -x -c firefox` -ne 0 ] || [ `/usr/bin/pgrep -x -c $MOZ_APP_NAME` -ne 0 ] ; then cp -f $MOZ_LIBDIR/$MOZ_APP_NAME-restart-required.update-notifier \ $UPDATENOTIFIERDIR/$MOZ_APP_NAME-restart-required else rm -f $UPDATENOTIFIERDIR/$MOZ_APP_NAME-restart-required fi fi #DEBHELPER#