Factory/ironic-image/runlogwatch.sh
Steven Hardy 5d2b779c68 ironic-image: Update to 26.1.2.0
To align with isv:SUSE:Edge:Metal3:Ironic:2024.2
2024-11-13 10:29:19 +01:00

12 lines
359 B
Bash

#!/usr/bin/bash
# Ramdisk logs path
LOG_DIR="/shared/log/ironic/deploy"
inotifywait -m "${LOG_DIR}" -e close_write |
while read -r path _action file; do
echo "************ Contents of ${path}/${file} ramdisk log file bundle **************"
tar -xOzvvf "${path}/${file}" | sed -e "s/^/${file}: /"
rm -f "${path}/${file}"
done