source: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.prerm @ 24685

Revision 24685, 2.4 KB checked in by broder, 14 years ago (diff)
In cluster-login-config: * Disable user switching on Lucid by setting /desktop/gnome/lockdown/disable_user_switching again. (Trac: #496)
  • Property svn:executable set to *
Line 
1#!/bin/sh
2# prerm 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#        * <prerm> `remove'
10#        * <old-prerm> `upgrade' <new-version>
11#        * <new-prerm> `failed-upgrade' <old-version>
12#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
13#        * <deconfigured's-prerm> `deconfigure' `in-favour'
14#          <package-being-installed> <version> `removing'
15#          <conflicting-package> <version>
16# for details, see http://www.debian.org/doc/debian-policy/ or
17# the debian-policy package
18
19# dh_installdeb will replace this with shell code automatically
20# generated by other debhelper scripts.
21
22#DEBHELPER#
23
24case "$1" in
25    remove|upgrade|deconfigure)
26        perl -i'' -ne 's%^### (BEGIN|END) debathena-cluster-login-config\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
27
28        for i in $(seq 1 6); do
29            initctl stop "tty$i" >/dev/null 2>&1 || true
30            initctl start "tty$i" >/dev/null 2>&1 || true
31        done
32
33        # Undo our mandatory gconf settings.
34        gcsrc=xml:readwrite:/etc/gconf/gconf.xml.mandatory
35        gcunset="gconftool-2 --direct --config-source=$gcsrc --unset"
36        $gcunset /apps/gnome-screensaver/logout_enabled
37        $gcunset /apps/gnome-screensaver/logout_delay
38        $gcunset /apps/gnome-screensaver/logout_command
39        $gcunset /apps/gnome-screensaver/embedded_keyboard_command
40        $gcunset /apps/gnome-screensaver/embedded_keyboard_enabled
41        $gcunset /apps/gnome-screensaver/user_switch_enabled
42        $gcunset /apps/gnome-screensaver/lock_enabled
43        $gcunset /apps/gnome-screensaver/lock_delay
44        $gcunset /apps/fast-user-switch-applet/show_active_users_only
45        $gcunset /apps/fast-user-switch-applet/show_guest_login
46        $gcunset /apps/gnome-power-manager/general/can_hibernate
47        $gcunset /apps/gnome-power-manager/general/can_suspend
48        $gcunset /desktop/gnome/lockdown/disable_user_switching
49
50        # Undo our default gconf settings.
51        gcsrc=xml:readwrite:/etc/gconf/gconf.xml.defaults
52        gcunset="gconftool-2 --direct --config-source=$gcsrc --unset"
53        $gcunset /desktop/gnome/session/required_components/windowmanager
54    ;;
55
56    failed-upgrade)
57    ;;
58
59    *)
60        echo "prerm called with unknown argument \`$1'" >&2
61        exit 1
62    ;;
63esac
64
65exit 0
66
67
Note: See TracBrowser for help on using the repository browser.