File: postinst

package info (click to toggle)
nethack 3.2.3-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 9,960 kB
  • ctags: 14,316
  • sloc: ansic: 155,139; asm: 2,412; yacc: 2,002; makefile: 887; lex: 412; sh: 160
file content (38 lines) | stat: -rw-r--r-- 1,239 bytes parent folder | download
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
#!/bin/sh

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

# Modified 10 October 1997 to fix permissions on /var/lib/games/nethack.
# Modified 18 August 1998 to fix more upgrade problems from ancient
# nethacks

set -e

# This is super anal. It should work for all cases, for all upgrades.

find /var/lib/games/nethack -print0 | xargs -r -0 chgrp games

chmod 02775 /var/lib/games/nethack/

find /var/lib/games/nethack -type f -print0 | xargs -r -0 chmod 664
find /var/lib/games/nethack -type f -name '*lock*' -print0 | xargs -r -0 chmod 660

chmod 02775 /var/lib/games/nethack/save/

find /var/lib/games/nethack/save -type f -print0 | xargs -r -0 chmod 660

# These have been moved to the postinst per policy; they should not be
# conffiles. They are removed on purge in the postrm.

touch /var/lib/games/nethack/{perm,record,logfile}
chown root.games /var/lib/games/nethack/{perm,record,logfile}
chmod 0664 /var/lib/games/nethack/{perm,record,logfile}

if [ -x /usr/X11R6/bin/mkfontdir ] ; then /usr/X11R6/bin/mkfontdir \
  /usr/X11R6/lib/X11/fonts/misc ; fi

#DEBHELPER#