From 7ceff2c69677cbdc747af119e4eac52fe5a7213d Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Mon, 30 Oct 2017 17:11:55 -0600 Subject: [PATCH] Check for /var/log/audit The audit.log file may not be readable by the user running the copy_logs.sh script. Let's check that the directory exists and then copy the file. Change-Id: I25247dd8049b8ad4f055ca4e3d6e4b3dfc9ed97b --- copy_logs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copy_logs.sh b/copy_logs.sh index 9da159d26..b4f6a983d 100755 --- a/copy_logs.sh +++ b/copy_logs.sh @@ -180,8 +180,8 @@ if [ -f /var/log/qdrouterd/qdrouterd.log ]; then fi fi -if [ -f /var/log/audit/audit.log ]; then - sudo cp /var/log/audit/audit.log $LOG_DIR/audit.log.txt +if [ -d /var/log/audit/ ]; then + sudo cp /var/log/audit/audit.log $LOG_DIR/audit.log.txt || true fi if [ -d /tmp/openstack/tempest ]; then