From a6ed5f3dc6db9e3fbf4db1473d0cb1bb261dc9ca Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 8 May 2018 13:45:29 +0100 Subject: [PATCH] test-log-collect.sh: Fix log collection for host The lxc_cmd variable is being set when we collect log information for containers but it is not unset when we do the same thing on the host. As a result of which, the host repo and pkg logs were wrong since they were collected from the last container instead of the host. Change-Id: If2d0a84b46538e44f383967108ca9f67e91f5054 --- test-log-collect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-log-collect.sh b/test-log-collect.sh index 4565098f..7057bfcd 100755 --- a/test-log-collect.sh +++ b/test-log-collect.sh @@ -77,7 +77,7 @@ COMMON_ETC_LOG_NAMES="apt \ ## Functions ----------------------------------------------------------------- function repo_information { - [[ "${1}" != "host" ]] && lxc_cmd="lxc-attach --name ${1} --" + [[ "${1}" != "host" ]] && lxc_cmd="lxc-attach --name ${1} --" || lxc_cmd="" echo "Collecting list of installed packages and enabled repositories for \"${1}\"" # Redhat package debugging if eval sudo ${lxc_cmd} which yum &>/dev/null || eval sudo ${lxc_cmd} which dnf &>/dev/null; then