From aba10663bdd5af8e1129bae6c01e7fdd09cb1a4e Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 27 Feb 2018 12:10:17 +0000 Subject: xci: scripts: start-new-vm: Mask the pgrep exit code pgrep will exit with non-zero exit code if it didn't find a matching process. This breaks the script since we set 'errexit' so we need to mask it by simply piping it to a 'cat' command. Change-Id: I80dcf06b597a769242bd59d628bbd8e09f0f199e Signed-off-by: Markos Chandras --- xci/scripts/vm/start-new-vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xci/scripts') diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index 5f7fe590..f53ec5ef 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -127,7 +127,7 @@ esac echo "Checking for running package manager instance..." while true; do - _pkg_mgr_proc=$(pgrep -f "${pkg_mgr_cmd%*install*}") + _pkg_mgr_proc=$(pgrep -f "${pkg_mgr_cmd%*install*}" | cat) if [[ -n ${_pkg_mgr_proc} ]]; then echo "Wainting for process ${_pkg_mgr_proc} to finish..." sleep 60 -- cgit 1.2.3-korg