diff options
-rw-r--r-- | net-fs/shfs/files/shfs.mount | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net-fs/shfs/files/shfs.mount b/net-fs/shfs/files/shfs.mount index e9be033da164..b69fde488bae 100644 --- a/net-fs/shfs/files/shfs.mount +++ b/net-fs/shfs/files/shfs.mount @@ -21,8 +21,8 @@ case `basename $0` in RUSER=`echo "$KEY" | cut -d"%" -f1` RHOST=`echo "$KEY" | cut -d"%" -f2-` - SSH_AGENT_PID=`ps -C ssh-agent -opid=,uid= | sed -n "s/^[ \t]\{1,\}\([0-9]\{1,\}\)\{1,\}[ \t]\{1,\}$ID\$/\1/p" | tail -1` - SSH_AUTH_SOCK=`find /tmp -follow -maxdepth 4 -type s -user "$ID" | grep ssh | grep agent | tail -1` + SSH_AGENT_PID=`ps -C ssh-agent -opid=,uid= | sed -n "s/^[ \t]\{1,\}\([0-9]\{1,\}\)\{1,\}[ \t]\{1,\}$ID\$/\1/p" | tail -n 1` + SSH_AUTH_SOCK=`find /tmp -follow -maxdepth 4 -type s -user "$ID" | grep ssh | grep agent | tail -n 1` if [ ! -z "$SSH_AGENT_PID" -a ! -z "$SSH_AUTH_SOCK" ]; then export SSH_AGENT_PID SSH_AUTH_SOCK |