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

Revision 23600, 1.8 KB checked in by andersk, 16 years ago (diff)
In linerva: * Disable Ctrl-Alt-Del.
  • 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        else
57            /etc/init.d/openafs-client restart
58        fi
59
60        # Install the http redirect inetd service
61        update-inetd --add "http\tstream\ttcp\tnowait\tnobody\t/bin/nc nc scripts.mit.edu http"
62    ;;
63
64    abort-upgrade|abort-remove|abort-deconfigure)
65    ;;
66
67    *)
68        echo "postinst called with unknown argument \`$1'" >&2
69        exit 1
70    ;;
71esac
72
73exit 0
Note: See TracBrowser for help on using the repository browser.