This file is indexed.

postinst is in lightdm 1.2.1-0ubuntu1.

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
#!/bin/sh

set -e

if dpkg-maintscript-helper supports mv_conffile; then
  dpkg-maintscript-helper mv_conffile \
    /etc/lightdm.conf \
    /etc/lightdm/lightdm.conf \
    0.3.7-0ubuntu2 -- "$@"
fi    

. /usr/share/debconf/confmodule

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

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

# creating lightdm user if he isn't already there
if ! getent passwd lightdm >/dev/null; then
        adduser --system --ingroup lightdm --home /var/lib/lightdm lightdm
        usermod -c "Light Display Manager" lightdm
        usermod -d "/var/lib/lightdm"      lightdm
        usermod -g "lightdm"               lightdm
        usermod -s "/bin/false"            lightdm
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 LightDM's PAM policy.
if ! getent group nopasswdlogin >/dev/null; then
        addgroup --system nopasswdlogin
fi

if [ -d /var/lib/lightdm ]; then
  chown lightdm:lightdm /var/lib/lightdm
  chmod 0750 /var/lib/lightdm
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

# Registering the init scripts or starting the daemon may cause output to
# stdout, which can confuse debconf.
db_stop

# migrate gdm configuration on first-time installation
if [ -z "$2" ]; then
    if grep -q '^AutomaticLoginEnable *= *true$' /etc/gdm/custom.conf 2>/dev/null; then
        user=`sed -n '/^AutomaticLogin *=/ { s/^.*= *//; p }' /etc/gdm/custom.conf`
        if [ -n "$user" ]; then
            /usr/lib/lightdm/lightdm-set-defaults --keep-old --autologin="$user"
        fi
    fi
fi

# Automatically added by dh_installinit
update-rc.d -f lightdm remove >/dev/null || exit $?
# End automatically added section


exit 0