This file is indexed.

postinst is in gdm 3.10.0.1-0ubuntu3.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  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
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/sh

set -e

. /usr/share/debconf/confmodule

THIS_PACKAGE=gdm
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager

# creating gdm group if it isn't already there
if ! getent group gdm >/dev/null; then
        addgroup --system --quiet gdm
fi

# creating gdm user if it isn't already there
if ! getent passwd gdm >/dev/null; then
        adduser --system --quiet \
            --ingroup gdm \
            --home /var/lib/gdm --no-create-home \
            --shell /bin/false \
            gdm
        usermod -c "Gnome Display Manager" gdm
fi

# Creating nopasswdlogin group if he isn't already there.
# That enables the password-less login feature in the users-admin
# tool of the gnome-system-tools for users that belong to it,
# and which is working thanks to GDM's PAM policy.
if ! getent group nopasswdlogin >/dev/null; then
        addgroup --system nopasswdlogin
fi

if [ -d /var/lib/gdm ]; then
  chown -R gdm:gdm /var/lib/gdm
  chmod 0750 /var/lib/gdm
fi

# 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
  DEFAULT_DISPLAY_MANAGER=
  if db_get shared/default-x-display-manager; then
    DEFAULT_DISPLAY_MANAGER="$RET"
  fi
  if [ -n "$DEFAULT_DISPLAY_MANAGER" ]; then
    DAEMON_NAME=
    if db_get "$DEFAULT_DISPLAY_MANAGER"/daemon_name; then
      DAEMON_NAME="$RET"
    fi
    if [ -z "$DAEMON_NAME" ]; then
      # if we were unable to determine the name of the selected daemon (for
      # instance, if the selected default display manager doesn't provide a
      # daemon_name question), guess
      DAEMON_NAME=$(which "$DEFAULT_DISPLAY_MANAGER" 2>/dev/null)
    fi
    if [ -n "$DAEMON_NAME" ]; then
      echo "$DAEMON_NAME" > "$DEFAULT_DISPLAY_MANAGER_FILE"
    fi
  fi
fi

# debconf hangs if gdm gets started below without this
db_stop || true

# update-rc.d levels
S=30
K=01

if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl "3.2"; then
  # Remove 3.0 gsettings configuration - now we use dconf
  rm -f /var/lib/gdm/gschemas.compiled
fi

if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl "3.4" \
	&& [ -d /var/lib/gdm ]; then
  # Remove anything GConf related
  (
    cd /var/lib/gdm
    rm -rf .gconf .gconf.mandatory .gconf.path .gconfd
  )
fi

if [ ! -f /etc/pam.d/gdm-launch-environment ]; then
    ln -s gdm-autologin /etc/pam.d/gdm-launch-environment
fi
if [ ! -f /etc/pam.d/gdm-password ]; then
    ln -s gdm /etc/pam.d/gdm-password
fi

if [ -L /etc/pam.d/gdm-welcome ]; then
    rm -f /etc/pam.d/gdm-welcome
fi

if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
    dpkg-maintscript-helper rm_conffile /etc/X11/Xsession.d/60xdg_path-on-session 3.0.4-0ubuntu4 -- "$@"
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/gdm" ]; then
	if [ ! -e "/etc/init/gdm.conf" ]; then
		update-rc.d gdm defaults >/dev/null
	fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f gdm remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/gdm/greeter.gconf-defaults 3.4 -- "$@"
# End automatically added section


exit 0