From 7c853ec2c1692b449190a5142fa3219bcc510c9a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 20 Feb 2013 12:46:02 +0000 Subject: [PATCH] Hide errors when `lsb_release` is not installed. --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 6381579..339cca9 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -376,8 +376,8 @@ __gather_linux_system_info() { DISTRO_VERSION="" # Let's test if the lsb_release binary is available - rv=$(lsb_release 2>&1) - if [ "x${rv}" != "x" ]; then + rv=$(lsb_release >/dev/null 2>&1) + if [ $? -eq 0 ]; then DISTRO_NAME=$(lsb_release -si) rv=$(lsb_release -sr) [ "${rv}x" != "x" ] && DISTRO_VERSION=$(__parse_version_string "$rv")