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
(cherry picked from commit a6ed5f3dc6
)
This commit is contained in:
parent
93dc5b2f65
commit
daefb0a00a
|
@ -75,7 +75,7 @@ COMMON_ETC_LOG_NAMES="apt \
|
||||||
## Functions -----------------------------------------------------------------
|
## Functions -----------------------------------------------------------------
|
||||||
|
|
||||||
function repo_information {
|
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}\""
|
echo "Collecting list of installed packages and enabled repositories for \"${1}\""
|
||||||
# Redhat package debugging
|
# Redhat package debugging
|
||||||
if eval sudo ${lxc_cmd} which yum &>/dev/null || eval sudo ${lxc_cmd} which dnf &>/dev/null; then
|
if eval sudo ${lxc_cmd} which yum &>/dev/null || eval sudo ${lxc_cmd} which dnf &>/dev/null; then
|
||||||
|
|
Loading…
Reference in New Issue