[25478] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25009 - trunk/debathena/debathena/xsession/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Mar 9 15:40:09 2011

Date: Wed, 9 Mar 2011 15:40:03 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201103092040.p29Ke3oF013477@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2011-03-09 15:40:02 -0500 (Wed, 09 Mar 2011)
New Revision: 25009

Modified:
   trunk/debathena/debathena/xsession/debian/changelog
   trunk/debathena/debathena/xsession/debian/debathena-check-afs.sh
Log:
In xsession:
  * Incoprorate new DEBATHENA_HOME_TYPE values into check-afs.sh and
    remove hack


Modified: trunk/debathena/debathena/xsession/debian/changelog
===================================================================
--- trunk/debathena/debathena/xsession/debian/changelog	2011-03-09 20:39:44 UTC (rev 25008)
+++ trunk/debathena/debathena/xsession/debian/changelog	2011-03-09 20:40:02 UTC (rev 25009)
@@ -1,3 +1,10 @@
+debathena-xsession (1.17.2) unstable; urgency=low
+
+  * Incoprorate new DEBATHENA_HOME_TYPE values into check-afs.sh and
+    remove hack
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 09 Mar 2011 15:36:00 -0500
+
 debathena-xsession (1.17.1) unstable; urgency=low
 
   * Fix broken line continuation in gdm-sucks and check-afs Xsession.d

Modified: trunk/debathena/debathena/xsession/debian/debathena-check-afs.sh
===================================================================
--- trunk/debathena/debathena/xsession/debian/debathena-check-afs.sh	2011-03-09 20:39:44 UTC (rev 25008)
+++ trunk/debathena/debathena/xsession/debian/debathena-check-afs.sh	2011-03-09 20:40:02 UTC (rev 25009)
@@ -2,15 +2,20 @@
     zenity --warning --text="Your AFS home directory appears to be unavailable, and this login session cannot continue.\n\nThis could be due to an AFS outage, a network problem, or an issue with this specific workstation.  We recommend you try another workstation, or a different cluster.\n\nIf the problem appears to only be on this workstation, please notify hotline@mit.edu and mention this machine's hostname ($(hostname -f)).  If the problem persists on multiple workstations, please contact the IS&amp;T Helpdesk (helpdesk@mit.edu or x3-1101)."
     exit 0
 }
-if [ "$DEBATHENA_HOME_TYPE" = "afs" ]; then
-    [ -d "$HOME" ] || youlose
-elif [ "$DEBATHENA_HOME_TYPE" = "local" ] && echo "$(id -Gn | sed -e 's/ /\n/g')" | grep -q ^nss-nonlocal-users$; then
-    # DEBATHENA_HOME_TYPE=local if AFS is not running, awesome
-    # This code can get removed when Trac #838 is fixed
-    REALHOME=$HOME
-    [ -h $HOME ] && REALHOME=$(readlink $HOME)
-    if echo $REALHOME | grep -q ^/afs; then
-	fs whichcell $REALHOME || youlose
+youmightlose() {
+    if ! zenity --question --text="Your home directory type could not be determined.  This might indicate problems with the AFS servers, or you might have an error in your AFS permissions.\n\nIf you know what you're doing, it's possible that this error is benign and you can continue.  However, it's more than likely that this login session will fail and you'll need to reboot the workstation to log out.  With that in mind, would you like to continue?"; then
+	exit 0
     fi
-fi
+}
+case "$DEBATHENA_HOME_TYPE" in
+    missing)
+	youlose
+	;;
+    unknown)
+	youmightlose
+	;;
+    afs)
+	[ -d "$HOME" ] || youlose
+	;;
+esac
 	


home help back first fref pref prev next nref lref last post