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
This commit is contained in:
parent
0b09a05bd1
commit
a6ed5f3dc6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user