CentOS: Capture yum repository files

When some of the repositories are not accessible, repository list is
not properly captured and that makes it difficult to find out which
repository is wrong or has an issue.
This change ensures the repository configuration files are captured
as part of logs, for easy reference.

Change-Id: I9eae6425761b9a93ab0f44d4cb42d93a1add6b40
(cherry picked from commit 8c220d00d4)
(cherry picked from commit 953af8500f)
This commit is contained in:
Takashi Kajinami 2022-02-05 17:48:01 +09:00
parent f3676b175a
commit 73e54fe82e
1 changed files with 4 additions and 0 deletions

View File

@ -226,6 +226,10 @@ if [ `command -v gem` ]; then
gem list |sort > $LOG_DIR/gem-list.txt
fi
if is_fedora; then
sudo cp -r /etc/yum.repos.d $LOG_DIR/etc/yum.repos.d
fi
# system status & informations
sudo cp /root/openrc $LOG_DIR/openrc.txt
sudo chmod 777 $LOG_DIR/openrc.txt