Use POSIX-Compliant Command-Exists Test

Suggest the `command` command instead of `which` to determine if the `lsb_release` command exists.
`which` is a non-standard command and this script and its documentation should work across as many POSIX like systems as possible.
`command` is more portable than `which`.

To be consistent with the existing suggestion, the updated suggestion will only act if `lsb_release` exists and is a simple command, not an alias or shell function.

References:
http://stackoverflow.com/a/677212/418413
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html
This commit is contained in:
Michael A. Smith 2016-01-25 08:25:34 -05:00
parent 5480cf9b09
commit da4414a871

View file

@ -392,7 +392,7 @@ Please run the following commands and report their output when creating a ticket
.. code:: console
sudo find /etc/ -name '*-release' -print -exec cat {} \;
which lsb_release && lsb_release -a
command lsb_release -a
Testing in Vagrant