This file is indexed.

postinst is in nethack-common 3.6.0-4+b1.

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

# Nethack post-installation script for Debian
#
# Ben Gertzfield (che@debian.org) 29 July 1997
# Joshua Kwan (joshk@triplehelix.org) 11 Oct 2003
# Copyright 1997 Ben Gertzfield, 2003 Joshua Kwan. This script is
# released under the GNU General Public License, version 2 or later.

# Modified 10 October 1997 to fix permissions on /var/games/nethack.
# Modified 18 August 1998 to fix more upgrade problems from ancient
# nethacks
# Modified 11 April 2001 to change path to /var/games/nethack.
# Modified 23 March 2002, removed code to change path from
#  /var/lib/games/nethack -> /var/games/nethack since the save files
#  changed format anyway.
# Modified 11 Oct 2003, move all the preinst stuff here.
# Modified 19 Feb 2009, drop the "backup incompatible" stuff

set -e

. /usr/share/debconf/confmodule

LOGDIR=/var/games/nethack
OLDLOGDIR=/var/lib/games/nethack

if [ "$1" = "configure" ]; then
    db_get nethack-common/recover-setgid

    if [ "$RET" = false ]; then
      # Remove the statoverride that may have been left over from previous
      # configurations
      if dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null
      then
        dpkg-statoverride --remove /usr/lib/games/nethack/recover
      fi

      # Remove setgid bit
      chmod 755 /usr/lib/games/nethack/recover
    else
      if ! dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null
      then
        dpkg-statoverride --update --add root games 2755 /usr/lib/games/nethack/recover
      fi
    fi

    db_stop

    for file in perm record logfile xlogfile; do
      if [ ! -e /var/games/nethack/$file ]; then
        touch /var/games/nethack/$file
        chmod 0664 /var/games/nethack/$file
        chown root:games /var/games/nethack/$file
      fi
    done
fi

# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
	if [ -x "/etc/init.d/nethack-common" ]; then
		update-rc.d nethack-common defaults >/dev/null || exit $?
	fi
fi
# End automatically added section