#!/bin/sh -e . /usr/share/debconf/confmodule db_version 2.0 PKG="byobu" db_get byobu/launch-by-default || true if [ "$RET" = true ]; then ln -sf /usr/bin/$PKG-launch /etc/profile.d/Z98-$PKG.sh else rm -f /etc/profile.d/Z98-$PKG.sh fi # Clean up any old-school screen-profiles diversions of /usr/bin/screen if [ -f /usr/bin/screen ] && [ -f /usr/bin/screen.real ]; then divertpkg=$(dpkg-divert --listpackage /usr/bin/screen || true) if [ "$divertpkg" = "screen-profiles" ]; then rm -f /usr/bin/screen dpkg-divert --package screen-profiles --rename --remove /usr/bin/screen fi fi # Remove the short-lived MOTD message rm -f /etc/update-motd.d/55-window-manager # Notify users that they should reload their profile touch_flag() { touch "$1" chown --reference $(dirname "$1") "$1" || true chmod 700 "$1" } [ -r "/etc/$PKG/socketdir" ] && . "/etc/$PKG/socketdir" if [ -d "$SOCKETDIR" ]; then for d in "$SOCKETDIR"/S-*; do if [ -d "$d/$PKG" ]; then # New location of the reload flag touch_flag "$d/$PKG/reload-required" elif [ -d "$d" ]; then # Old location of the reload flag touch_flag "$d/$PKG.reload-required" fi done fi #DEBHELPER# # vi: syntax=sh ts=4 noexpandtab