diff options
| author | Moritz Beber <m.beber@jacobs-university.de> | 2010-08-16 16:02:26 +0200 |
|---|---|---|
| committer | Moritz Beber <m.beber@jacobs-university.de> | 2010-08-16 16:02:26 +0200 |
| commit | 8aacd9ef928015dc34c0a1a3c66eab53741974d3 (patch) | |
| tree | 6320d03622989f5b01577bd25874782dac7bd6ed | |
| parent | 0ea4d26b9230a38ab43eaeb95eddeff08bddd8b0 (diff) | |
Revised grep check
Changed the grep check from simply ignoring its own entry, i.e., grep -v grep to
checking that the process running under the SSH_AGENT_PID is actually an
ssh-agent.
| -rw-r--r-- | _posts/2009-09-03-working-with-key-passphrases.textile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/_posts/2009-09-03-working-with-key-passphrases.textile b/_posts/2009-09-03-working-with-key-passphrases.textile index 13a2f92..19e45bd 100644 --- a/_posts/2009-09-03-working-with-key-passphrases.textile +++ b/_posts/2009-09-03-working-with-key-passphrases.textile @@ -63,14 +63,14 @@ function test_identities { } # check for running ssh-agent with proper $SSH_AGENT_PID -ps -ef | grep $SSH_AGENT_PID | grep -v grep > /dev/null +ps -ef | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null if [ $? -eq 0 ]; then test_identities # if $SSH_AGENT_PID is not properly set, we might be able to load one from # $SSH_ENV else . $SSH_ENV > /dev/null - ps -ef | grep $SSH_AGENT_PID | grep -v grep > /dev/null + ps -ef | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null if [ $? -eq 0 ]; then test_identities else |
