summaryrefslogtreecommitdiffstats
path: root/debian/gdm3.config
diff options
context:
space:
mode:
Diffstat (limited to 'debian/gdm3.config')
-rw-r--r--debian/gdm3.config43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/gdm3.config b/debian/gdm3.config
new file mode 100644
index 0000000..488cec9
--- /dev/null
+++ b/debian/gdm3.config
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Debian gdm package configuration script
+# Copyright 2000-2001 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+
+set -e
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+THIS_PACKAGE=gdm3
+DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager
+
+# set default display manager
+
+db_get shared/default-x-display-manager
+OLD_DEFAULT="$RET"
+
+db_metaget shared/default-x-display-manager owners
+OWNERS="$RET"
+db_metaget shared/default-x-display-manager choices
+CHOICES="$RET"
+
+if [ "$OWNERS" != "$CHOICES" ]; then
+ db_subst shared/default-x-display-manager choices $OWNERS
+ db_fset shared/default-x-display-manager seen false
+fi
+
+db_input high shared/default-x-display-manager || true
+db_go
+
+# using this display manager?
+db_get shared/default-x-display-manager
+CURRENT_DEFAULT="$RET"
+# set a flag to indicate to postinst that we need to update from debconf
+if [ "$OLD_DEFAULT" != "$CURRENT_DEFAULT" ]; then
+ DEFAULT_DISPLAY_MANAGER_DIR=$(dirname $DEFAULT_DISPLAY_MANAGER_FILE)
+ test -e $DEFAULT_DISPLAY_MANAGER_DIR || mkdir -p $DEFAULT_DISPLAY_MANAGER_DIR
+ touch $DEFAULT_DISPLAY_MANAGER_FILE.debconf-update
+fi
+
+exit 0