This did eventually work around my problem:
https://gist.github.com/mikemol/084759d9bbbaf818ecbb0688d4cc0f5c

I suppose the difference between the exit code of 1 and 2 was
sufficiently useful.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to openssh in Ubuntu.
https://bugs.launchpad.net/bugs/1870932

Title:
  ssh-add -L incorrectly reports a failure when successfully retrieving
  an empty identity list

Status in openssh package in Ubuntu:
  New

Bug description:
  Example of behavior:

  ```
  mikemol@kaylee:~$ ssh-add -L
  The agent has no identities.
  mikemol@kaylee:~$ echo $?
  1
  mikemol@kaylee:~$
  ```

  I expected an exit code of 0 if the agent was running. I don't need
  the list of identities; I'm trying to validate that the agent is
  running, accessible, and operational.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: openssh-client 1:7.6p1-4ubuntu0.3
  ProcVersionSignature: Ubuntu 4.15.0-69.78-generic 4.15.18
  Uname: Linux 4.15.0-69-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.14
  Architecture: amd64
  Date: Sun Apr  5 10:38:25 2020
  InstallationDate: Installed on 2018-12-16 (475 days ago)
  InstallationMedia: Kubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 
(20180725)
  ProcEnviron:
   TERM=screen.xterm-256color
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  RelatedPackageVersions:
   ssh-askpass       N/A
   libpam-ssh        N/A
   keychain          N/A
   ssh-askpass-gnome N/A
  SSHClientVersion: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
  SourcePackage: openssh
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1870932/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to