svn commit: r235481 - head/share/examples/csh

Eitan Adler eadler at FreeBSD.org
Tue May 15 20:15:18 UTC 2012


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


More information about the svn-src-all mailing list