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
This commit is contained in:
Takashi Kajinami 2022-02-05 17:48:01 +09:00
parent 37971f6925
commit 8c220d00d4
1 changed files with 4 additions and 0 deletions

View File

@ -233,6 +233,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