1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!/bin/sh
# postinst script for x2gothinclient-daemon
#
# see: dh_installdeb(1)
set -e
# source debconf's configuration module
. /usr/share/debconf/confmodule
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
THIS_PACKAGE=x2gothinclient-displaymanager
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
# debconf is not a registry, so we only fiddle with the default file if it
# does not exist
if [ ! -e $DEFAULT_DISPLAY_MANAGER_FILE ]; then
if db_get shared/default-x-display-manager; then
# workaround debconf passthru bug (#379198)
if [ -z "$RET" ]; then
$RET="$THIS_PACKAGE"
fi
if [ "$THIS_PACKAGE" != "$RET" ]; then
echo "Please be sure to run \"dpkg --configure $RET\"."
fi
echo "/usr/sbin/x2gothinclientd" > $DEFAULT_DISPLAY_MANAGER_FILE
fi
fi
# remove the displaced old default display manager file if it exists
if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp" ]; then
rm "$DEFAULT_DISPLAY_MANAGER_FILE.dpkg-tmp"
fi
# debconf hangs if gdm gets started below without this
db_stop || true
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
|