This file is indexed.

postinst is in gnats-user 4.1.0-5.

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
#!/bin/bash
#
# Gnats installation script -- written by Brian White <bcwhite@pobox.com>
# (This was my very first attempt at learning perl... please forgive me!)
#
# Forgiving -- rewritten to bash :-) by Milan Zamazal <pdm@debian.org>.
# ...and streamlined with SED by Chad Walstrom <chewie@debian.org>

set -e

###############################################################################
#
# Utility functions
#

# Call arguments and never return error
function protect () { "$@" || true; }

###############################################################################
#
# Common initialization for install scripts
#

. /usr/share/debconf/confmodule

###############################################################################
#
# Check the 'gnats' userid in the password file
#

if [ "$1" = configure ]; then

  if [ $(protect grep -c "^gnats:" /etc/group) -eq 0 ]; then
    adduser --group --gid 41 gnats
  fi
  
  PWFOUND=$(protect grep -c "^gnats:" /etc/passwd)

  if [ $PWFOUND -gt 1 ]; then
    db_subst gnats/user_multiple PASSWDFILE "/etc/passwd"
    protect db_input high gnats/user_multiple
    protect db_go
  fi

  if [ $PWFOUND -gt 0 ]; then
    if [ $(protect grep -c "^gnats:.*:/usr/lib/gnats/gnats-db:" /etc/passwd) -gt 0 ]
    then
      if [ -e /usr/lib/gnats/gnats-db/.profile ]; then
	mv /usr/lib/gnats/gnats-db/.profile /var/lib/gnats/
      fi
      usermod -d /var/lib/gnats gnats
    fi
    if [ $(protect grep -c "^gnats:[^:]*:41:41:" \
           /etc/passwd) \
	 -eq 0 ]
    then
      usermod -u 41 -G 41 gnats
    fi
  else
    adduser --quiet --system --home /var/lib/gnats --no-create-home \
            --gid 41 --shell /bin/sh --disabled-login \
	    --gecos 'GNU GNATS Bug-Reporting System' gnats
  fi

fi


###############################################################################
#
# Automatically added debhelper stuff
#
# Automatically added by dh_installemacsen/10.7.2ubuntu2
if [ "$1" = "configure" ] && [ -e /var/lib/emacsen-common/state/package/installed/emacsen-common -a -x /usr/lib/emacsen-common/emacs-package-install ]
then
	/usr/lib/emacsen-common/emacs-package-install --postinst gnats-user
fi
# End automatically added section