From c04d7f24325ab913fcf263ee5d15db4af1a4c2b4 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 2 Jan 2011 16:28:35 -0500 Subject: [PATCH] pwmc: let the -i option have priority over the ssh agent. The --url option has lower priority than ssh agent, though. --- doc/pwmc.1.in | 7 ++++++- src/pwmc.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/pwmc.1.in b/doc/pwmc.1.in index 3c8d92ac..8abbccef 100644 --- a/doc/pwmc.1.in +++ b/doc/pwmc.1.in @@ -83,7 +83,12 @@ or .B --url options. See .B ssh-add(1) -for how to add a private key to the ssh agent. +for how to add a private key to the ssh agent. Note that the +.B -i +command line option has priority over the ssh agent. It is not possible for +the +.B --url +option to have priority. .TP .I "\--identity, -i " diff --git a/src/pwmc.c b/src/pwmc.c index 9e1832ab..32d5b4a6 100644 --- a/src/pwmc.c +++ b/src/pwmc.c @@ -1292,7 +1292,7 @@ int main(int argc, char *argv[]) if (error) goto done; - if (!getenv("SSH_AGENT_PID")) + if (!getenv("SSH_AGENT_PID") || ident) use_ssh_agent = 0; error = pwmd_setopt(pwm, PWMD_OPTION_SSH_AGENT, use_ssh_agent); -- 2.11.4.GIT