Debian/Ubuntu: Capture core config files

In Debian and Ubuntu, some core config files such as apache2.conf
are located at the top-level config directory and are not captured.

This ensures these files are also captured after test run.

Change-Id: I28ea22a0e14769ba4bc1545a75569f9cf6e881d5
(cherry picked from commit 3768acbb55)
(cherry picked from commit 3abed84f4c)
This commit is contained in:
Takashi Kajinami
2023-11-19 19:35:02 +09:00
parent 457d4c229f
commit ff7777e107

View File

@@ -240,9 +240,15 @@ sudo cp /etc/sudoers $LOG_DIR/sudoers.txt
if uses_debs; then
apache_conf=/etc/apache2
apache_logs=/var/log/apache2
mkdir $LOG_DIR${apache_conf}
for f in apache2.conf ports.conf; do
if [ -f ${apache_conf}/${f} ]; then
sudo cp ${apache_conf}/${f} $LOG_DIR${apache_conf}/${f}
fi
done
for d in conf.d sites-enabled mods-enabled ; do
if [ -d ${apache_conf}/${d} ]; then
mkdir -p $LOG_DIR${apache_conf}/${d}
mkdir $LOG_DIR${apache_conf}/${d}
sudo cp ${apache_conf}/${d}/* $LOG_DIR${apache_conf}/${d}/
fi
done