Author: eadler
Date: Tue May 15 20:15:17 2012
New Revision: 235481
URL: http://svn.freebsd.org/changeset/base/235481

Log:
  Rework sample code which sets SSH_AUTH_SOCK to the user's ssh-agent
  socket path if running
  
  PR:           167932
  Submitted by: madpilot (pr)
  Submitted by: wblock (final patch)
  Reviewed by:  If someone else reviewed your modification.
  Approved by:  cperciva (implicit)
  MFC after:    3 days

Modified:
  head/share/examples/csh/dot.cshrc

Modified: head/share/examples/csh/dot.cshrc
==============================================================================
--- head/share/examples/csh/dot.cshrc   Tue May 15 17:21:46 2012        
(r235480)
+++ head/share/examples/csh/dot.cshrc   Tue May 15 20:15:17 2012        
(r235481)
@@ -5,7 +5,7 @@
 
 # Sets SSH_AUTH_SOCK to the user's ssh-agent socket path if running
 if (${?SSH_AUTH_SOCK} != "1") then
-       setenv SSH_AUTH_SOCK `sockstat | grep "${USER}" | cut -d ' ' -f 6` 
+       setenv SSH_AUTH_SOCK `sockstat | grep "^${USER} " | awk '/ssh-agent/ { 
print $6 }'`
 endif
 
 # Change only root's prompt
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to