[22685] | 1 | #!/bin/sh |
---|
| 2 | # postinst script for debathena-afs-config |
---|
| 3 | # |
---|
| 4 | # see: dh_installdeb(1) |
---|
| 5 | |
---|
| 6 | set -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 | |
---|
| 23 | case "$1" in |
---|
| 24 | configure) |
---|
| 25 | chmod 700 /root |
---|
| 26 | if [ -e /srv/old ]; then |
---|
| 27 | chmod 700 /srv/old |
---|
| 28 | fi |
---|
[23484] | 29 | |
---|
[23600] | 30 | # Disable Ctrl-Alt-Del. |
---|
| 31 | sed -i 's/^ca:/#&/' /etc/inittab |
---|
| 32 | telinit q |
---|
| 33 | |
---|
[22685] | 34 | # Make /srv/tmp exists so we can symlink to it. |
---|
| 35 | mkdir -p /srv/tmp |
---|
| 36 | |
---|
[23484] | 37 | # make logcheck able to read its stuff |
---|
[22685] | 38 | chown logcheck /var/lib/logcheck/ |
---|
| 39 | chown logcheck /var/lock/logcheck/ |
---|
[23497] | 40 | if [ ! -e /etc/logcheck/.git ]; then |
---|
[23571] | 41 | mv /etc/logcheck /etc/logcheck.orig || true |
---|
[23497] | 42 | fi |
---|
[23562] | 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 |
---|
[23593] | 48 | chgrp -R logcheck /etc/logcheck/ |
---|
[23497] | 49 | chmod 750 /etc/logcheck |
---|
| 50 | chmod 750 /etc/logcheck.orig |
---|
[22685] | 51 | |
---|
[23491] | 52 | linerva-clean-setugid --clean |
---|
[22685] | 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 |
---|
[23527] | 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" |
---|
[22685] | 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 | ;; |
---|
| 71 | esac |
---|
| 72 | |
---|
| 73 | exit 0 |
---|