source: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst @ 23288

Revision 23288, 1.7 KB checked in by broder, 16 years ago (diff)
In debathena-cluster-login-config, give sudo privileges to the admin group (which users will be in thanks to debathena-reactivate)
Line 
1#!/bin/sh
2# postinst script for debathena-cluster-login-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        # Shut down sshd.
26        if hash invoke-rc.d; then
27            invoke-rc.d ssh stop
28        else
29            /etc/init.d/ssh stop
30        fi
31
32        # Attempt to initially set the root password.
33        /usr/sbin/athena-root-password
34
35        # Set up gconf defaults.
36        defs=xml:readwrite:/etc/gconf/gconf.xml.defaults
37        gc="gconftool-2 --direct ---config-source=$defs --set"
38        $gc -t bool /desktop/gnome/lockdown/disable_user_switching true
39        $gc -t bool /apps/gnome-screensaver/logout_enabled true
40        $gc -t int /apps/gnome-screensaver/logout_delay 20
41        $gc -t string /apps/gnome-screensaver/logout_command \
42            "/usr/bin/gnome-session-save --kill --silent"
43        $gc -t bool /apps/gnome-screensaver/user_switch_enabled false
44        $gc -t bool /apps/gnome-screensaver/lock_enabled true
45        $gc -t int /apps/gnome-screensaver/lock_delay 1
46
47        cat >>/etc/sudoers <<EOF
48### BEGIN debathena-cluster-login-config
49%admin ALL=(root) ALL
50### END debathena-cluster-login-config
51EOF
52
53        exit 0
54    ;;
55
56    abort-upgrade|abort-remove|abort-deconfigure)
57    ;;
58
59    *)
60        echo "postinst called with unknown argument \`$1'" >&2
61        exit 1
62    ;;
63esac
Note: See TracBrowser for help on using the repository browser.