]> gitweb.fluxo.info Git - utils-ssh.git/commitdiff
Honor MONKEYSPHERE_SUBKEYS_FOR_AGENT env variable
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Mar 2019 01:33:18 +0000 (22:33 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Mar 2019 01:33:18 +0000 (22:33 -0300)
ssh-agent-loadkeys

index fe7955284dc79476b315c51dddba9ebb4e64709b..81dfe1be7a38398d35bc4b686f01261ff7ba904f 100755 (executable)
@@ -22,11 +22,15 @@ if [ -x '/usr/bin/keychain' ]; then
   #fi
 
   # Check for monkeysphere
-  #if [ -x '/usr/bin/monkeysphere' ]; then
-  #  if ! ssh-add -l &> /dev/null && [ "`gpg --list-secret-keys | wc -l`" != "0" ]; then
-  #    monkeysphere subkey-to-ssh-agent
-  #  fi
-  #fi
+  if [ -x '/usr/bin/monkeysphere' ]; then
+    #if ! ssh-add -l &> /dev/null && [ "`gpg --list-secret-keys | wc -l`" != "0" ]; then
+    # From MONKEYSPHERE(1): "The MONKEYSPHERE_SUBKEYS_FOR_AGENT environment can be used to specify the full
+    #                        fingerprints of specific keys to add to the agent  (space separated), instead
+    #                        of adding them all."
+    if [ ! -z "$MONKEYSPHERE_SUBKEYS_FOR_AGENT" ]; then
+      monkeysphere subkey-to-ssh-agent
+    fi
+  fi
 
   # Check for RSA key
   if [ -e "$HOME/.ssh/id_rsa" ]; then