Try to handle unrecognised terminals.
[profile.git] / .profile.d / krb5.bashrc
index 034dadd..4c5f71d 100644 (file)
@@ -3,7 +3,7 @@ alias pssh='ssh -o preferredauthentications=password,keyboard-interactive'
 
 unalias kinit 2>/dev/null
 if [ 1 = 0 -a -z "$OLDSOLARIS" -a -z "$OLDREDHAT" ]; then
-  if tty -s; then
+  if [ -t 0 ]; then
     if [ ! "$SUDO_UID" ]; then
       if klist -s 2>/dev/null; then
         # We already have a ticket cache.  Renew it.