[23288] | 1 | #!/bin/sh |
---|
[24524] | 2 | # prerm script for debathena-cluster-login-config |
---|
[23288] | 3 | # |
---|
| 4 | # see: dh_installdeb(1) |
---|
| 5 | |
---|
| 6 | set -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 | |
---|
[24668] | 19 | # dh_installdeb will replace this with shell code automatically |
---|
| 20 | # generated by other debhelper scripts. |
---|
[23288] | 21 | |
---|
[24668] | 22 | #DEBHELPER# |
---|
| 23 | |
---|
[23288] | 24 | case "$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 |
---|
[23594] | 27 | |
---|
[24668] | 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 |
---|
[23960] | 32 | |
---|
[23594] | 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 |
---|
[24685] | 48 | $gcunset /desktop/gnome/lockdown/disable_user_switching |
---|
[23594] | 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 |
---|
[23288] | 54 | ;; |
---|
| 55 | |
---|
| 56 | failed-upgrade) |
---|
| 57 | ;; |
---|
| 58 | |
---|
| 59 | *) |
---|
| 60 | echo "prerm called with unknown argument \`$1'" >&2 |
---|
| 61 | exit 1 |
---|
| 62 | ;; |
---|
| 63 | esac |
---|
| 64 | |
---|
| 65 | exit 0 |
---|
| 66 | |
---|
| 67 | |
---|