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

Revision 25002, 540 bytes checked in by jdreed, 14 years ago (diff)
In cluster-login-config: * Ship our own logout command which will force a logout on cluster if the user lacks tokens
  • 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
8if [ "$(machtype -L)" != "debathena-cluster" ]; then
9    gnome-session-save --force-logout
10    exit 0
11fi
12
13cell=athena.mit.edu
14afspath=$HOME
15if echo $HOME | grep -q ^/mit; then
16    # Shouldn't happen with std dotfiles
17    afspath=$(readlink $HOME)
18fi
19if echo $afspath | grep -q ^/afs; then
20    cell=$(echo $afspath | cut -d/ -f 3)
21fi
22if tokens | fgrep -q $cell; then
23    gnome-session-save --force-logout
24else
25    pkill schroot
26fi
27   
Note: See TracBrowser for help on using the repository browser.