#!/bin/bash set -e APPORT_FILE="/etc/default/apport" if [ "$1" = "configure" ] ; then #update dconf database, as we droped new settings dconf update #gconf trigger, for those settings still using gconf [ -x /usr/bin/update-gconf-defaults ] && /usr/bin/update-gconf-defaults # Xsession diversion to solve the Unity problem # Unity must be diverted # First create the directory for destination desktops [ -d "/usr/share/diverted-sessions/" ] || mkdir -p "/usr/share/diverted-sessions/" ORIGINAL_UNITY_FILE="/usr/share/xsessions/ubuntu.desktop" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/ubuntu.desktop" PKG="lliurex-artwork-defaults-desktop" dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" ORIGINAL_UNITY_FILE="/usr/share/xsessions/ubuntu-2d.desktop" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/ubuntu-2d.desktop" PKG="lliurex-artwork-defaults-desktop" dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE" ORIGINAL_UPGRADE_FILE="/etc/update-manager/release-upgrades" NEW_DIVERTED_FILE="/usr/share/diverted-sessions/release-upgrades.diverted" PKG="lliurex-artwork-defaults-desktop" if [ ! -L ${ORIGINAL_UPGRADE_FILE} ] ; then dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UPGRADE_FILE" ln -s /etc/update-manager/release-upgrades.lliurex $ORIGINAL_UPGRADE_FILE fi # DISABLE APPORT echo "enabled=0" > "$APPORT_FILE" fi #DEBHELPER# exit 0