]> gitweb.fluxo.info Git - utils-ssh.git/commitdiff
Check for OpenPGP secret keys before loading monkeysphere at ssh-agent-loadkeys (2)
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 15 Jul 2018 17:49:53 +0000 (14:49 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 15 Jul 2018 17:49:53 +0000 (14:49 -0300)
ssh-agent-loadkeys

index 47e7b901f3921cfcdccb0e26001dbee50ae8d1b5..48b4233e9d80bc4a4ceb8565a501cc4aefc4e3a5 100755 (executable)
@@ -23,7 +23,7 @@ if [ -x '/usr/bin/keychain' ]; then
 
   # Check for monkeysphere
   if [ -x '/usr/bin/monkeysphere' ]; then
-    if ! ssh-add -l &> /dev/null && gpg --list-secret-keys &> /dev/null; then
+    if ! ssh-add -l &> /dev/null && [ "`gpg --list-secret-keys`" != "0" ]; then
       monkeysphere subkey-to-ssh-agent
     fi
   fi