pag-screen: report more errors
authorAlex Dehnert <adehnert@mit.edu>
Thu, 21 Apr 2011 23:33:59 +0000 (19:33 -0400)
committerAlex Dehnert <adehnert@mit.edu>
Thu, 21 Apr 2011 23:33:59 +0000 (19:33 -0400)
pag-screen

index 2fc538d0749923305546d99981796fbcbeebfc9e..c0c46e8a807ef838593879c76ad02f0b67347883 100755 (executable)
@@ -15,7 +15,7 @@ fi
 # Get AFS tokens for the screen session.
 # We are now in a new PAG (because of pagsh).
 # If you want to get tokens for other cells, list them in ~/.xlog
-aklog
+aklog || echo "Failed to get new tokens"
 
 # Use separate kerberos tickets for screen. Even if we accidentally
 # (or intentionally) log out, screen and owl will still have tickets.
@@ -23,7 +23,11 @@ NEWKRB5=/tmp/krb5cc_${USER}_screen
 
 # Copy the tickets we obtained on login to the screen tickets.
 KRB5CCNAME=`echo $KRB5CCNAME | sed 's/FILE://'`
-cp $KRB5CCNAME $NEWKRB5
+if [ "x$KRB5CCNAME" != "x" ]; then
+    cp $KRB5CCNAME $NEWKRB5
+else
+    echo "No tickets; not copying to new CC"
+fi
 
 # Now actually use the new tickets.
 KRB5CCNAME=FILE:$NEWKRB5; export KRB5CCNAME