This file is indexed.

postinst is in nethack-common 3.4.3-14.

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
#!/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 other
      # configurations
      if dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null
      then
        dpkg-statoverride --remove /usr/lib/games/nethack/recover
      fi
      
      # Just in case
      chmod 755 /usr/lib/games/nethack/recover
    else
      if ! dpkg-statoverride --list /usr/lib/games/nethack/recover >/dev/null
      then
        dpkg-statoverride --add root games 2755 /usr/lib/games/nethack/recover
      fi
      
      chmod 2755 /usr/lib/games/nethack/recover
    fi
    
    db_stop
    
    for file in perm record logfile; 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

    # stale rc.d file
    if [ -f "/etc/rcS.d/S85nethack" ]; then
      echo "Removing old init script and its symlinks."
      rm -f /etc/init.d/nethack
      update-rc.d -f nethack remove
    fi
    if [ -f "/etc/rc0.d/K01nethack-common" ]; then
      echo "Removing shutdown functionality for the nethack-common init script."
      # dh_installinit takes care of the rest.
      update-rc.d -f nethack-common remove
    fi
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/nethack-common" ]; then
	if [ ! -e "/etc/init/nethack-common.conf" ]; then
		update-rc.d nethack-common start 18 2 3 4 5 . >/dev/null
	fi
fi
# End automatically added section