#!/bin/sh # prerm script for lliurex-dgti-defaults-configs # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package package='lliurex-dgti-defaults-configs' undivert() { file="$1" if [ ! -L "$file" ] && [ ! -e "$file" ]; then dpkg-divert --remove --rename --package "$package" "$file" else echo "Not removing diversion of $file by $package" >&2 fi } case "$1" in remove|upgrade|deconfigure) undivert /usr/bin/firefox undivert /usr/share/applications/firefox-esr.desktop undivert /opt/firefox-esr/defaults/pref/lliurex-default.js alternative=$(readlink -f /etc/alternatives/java) oracle_value='/usr/lib/jvm/java-8-oracle/jre/bin/java' if [ '$alternative' = $oracle_value ]; then update-alternatives --auto java fi alternative=$(readlink -f /etc/alternatives/mozilla-javaplugin.so) oracle_value='/usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so' if [ '$alternative' = $oracle_value ]; then update-alternatives --auto mozilla-javaplugin.so fi alternative=$(readlink -f /etc/alternatives/javaws) oracle_value='/usr/lib/jvm/java-8-oracle/jre/bin/javaws' if [ '$alternative' = $oracle_value ]; then update-alternatives --auto javaws fi ;; failed-upgrade) ;; *) echo "prerm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0