source: trunk/debathena/config/linerva/debian/debathena-linerva.postinst @ 24146

Revision 24146, 1.9 KB checked in by broder, 15 years ago (diff)
In linerva: * Also make /var/run/screen sticky after screen-cleanup runs.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2# postinst script for debathena-afs-config
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9#        * <postinst> `configure' <most-recently-configured-version>
10#        * <old-postinst> `abort-upgrade' <new version>
11#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12#          <new-version>
13#        * <postinst> `abort-remove'
14#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15#          <failed-install-package> <version> `removing'
16#          <conflicting-package> <version>
17# for details, see http://www.debian.org/doc/debian-policy/ or
18# the debian-policy package
19
20
21#DEBHELPER#
22
23case "$1" in
24    configure)
25        chmod 700 /root
26        if [ -e /srv/old ]; then
27            chmod 700 /srv/old
28        fi
29
30        # Disable Ctrl-Alt-Del.
31        sed -i 's/^ca:/#&/' /etc/inittab
32        telinit q
33
34        # Make /srv/tmp exists so we can symlink to it.
35        mkdir -p /srv/tmp
36
37        # make logcheck able to read its stuff
38        chown logcheck /var/lib/logcheck/
39        chown logcheck /var/lock/logcheck/
40        if [ ! -e /etc/logcheck/.git ]; then
41            mv /etc/logcheck /etc/logcheck.orig || true
42        fi
43        if [ ! -e /etc/logcheck ]; then
44            kinit -k
45            aklog sipb
46            git clone /afs/sipb.mit.edu/project/linerva/git/logcheck.git /etc/logcheck
47        fi
48        chgrp -R logcheck /etc/logcheck/
49        chmod 750 /etc/logcheck
50        chmod 750 /etc/logcheck.orig
51
52        linerva-clean-setugid --clean
53
54        if hash invoke-rc.d; then
55            invoke-rc.d openafs-client restart
56            invoke-rc.d procps force-reload
57        else
58            /etc/init.d/openafs-client restart
59            /etc/init.d/procps force-reload
60        fi
61
62        # Install the http redirect inetd service
63        update-inetd --add "http\tstream\ttcp\tnowait\tnobody\t/bin/nc nc scripts.mit.edu http"
64    ;;
65
66    abort-upgrade|abort-remove|abort-deconfigure)
67    ;;
68
69    *)
70        echo "postinst called with unknown argument \`$1'" >&2
71        exit 1
72    ;;
73esac
74
75exit 0
Note: See TracBrowser for help on using the repository browser.