source: trunk/debathena/config/cluster-login-config/debian/screensaver_logout.sh @ 25741

Revision 25741, 659 bytes checked in by jdreed, 12 years ago (diff)
In cluster-login-config: * Provide a gsettings-override file for Precise (Trac: #1242) * Update screensaver-logout to use gnome-session-quit
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# A more ... insistent ... logout command for gnome-screensaver
4#
5
6PATH=/usr/bin:/bin:$PATH
7
8GSESSION_END="gnome-session-quit --logout --no-prompt"
9if ! hash gnome-session-quit 2>/dev/null; then
10    GSESSION_END="gnome-session-save --force-logout"
11fi
12
13if [ "$(machtype -L)" != "debathena-cluster" ]; then
14    $GSESSION_END
15    exit 0
16fi
17
18cell=athena.mit.edu
19afspath=$HOME
20if echo $HOME | grep -q ^/mit; then
21    # Shouldn't happen with std dotfiles
22    afspath=$(readlink $HOME)
23fi
24if echo $afspath | grep -q ^/afs; then
25    cell=$(echo $afspath | cut -d/ -f 3)
26fi
27if tokens | fgrep -q $cell; then
28    $GSESSION_END
29else
30    pkill schroot
31fi
32   
Note: See TracBrowser for help on using the repository browser.