From f277bef5c032b762c5a0d04d9c919d27cc0f9c64 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Thu, 16 Feb 2017 17:48:08 -0800 Subject: [PATCH] Fix packaging test to only run lsb_release if it exists --- .../src/test/resources/packaging/tests/60_systemd.bats | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qa/vagrant/src/test/resources/packaging/tests/60_systemd.bats b/qa/vagrant/src/test/resources/packaging/tests/60_systemd.bats index 7eaa0843f9f..10897753ab3 100644 --- a/qa/vagrant/src/test/resources/packaging/tests/60_systemd.bats +++ b/qa/vagrant/src/test/resources/packaging/tests/60_systemd.bats @@ -87,10 +87,12 @@ setup() { # Always AssumeMP on RHEL. # - Resolves: rhbz#1381990 # - # Here we set the "-XX:-AssumeMP" option to false again: - lsb_release=$(lsb_release -i) - if [[ "$lsb_release" =~ "CentOS" ]] || [[ "$lsb_release" =~ "OracleServer" ]]; then - echo "-XX:-AssumeMP" >> $ESCONFIG/jvm.options + if [ -x "$(command -v lsb_release)" ]; then + # Here we set the "-XX:-AssumeMP" option to false again: + lsb_release=$(lsb_release -i) + if [[ "$lsb_release" =~ "CentOS" ]] || [[ "$lsb_release" =~ "OracleServer" ]]; then + echo "-XX:-AssumeMP" >> $ESCONFIG/jvm.options + fi fi systemctl start elasticsearch.service