File: x2gothinclient-displaymanager.postinst

package info (click to toggle)
x2gothinclient 1.5.0.1-10.2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 860 kB
  • sloc: sh: 1,285; perl: 433; cpp: 76; makefile: 28
file content (54 lines) | stat: -rwxr-xr-x 1,675 bytes parent folder | download | duplicates (4)
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