copy_logs: use journalctl only if present
The binary is only present on systemd platform. We still run beaker jobs on Trusty so we need to use it only for Xenial. Change-Id: Ia45d7d7c5fa51863bc06656d188cd008bcf8b781
This commit is contained in:
parent
312b77f28b
commit
0b1e926f7b
@ -62,7 +62,9 @@ done
|
||||
if uses_debs; then
|
||||
sudo cp /var/log/kern.log $LOG_DIR/kern_log.txt
|
||||
fi
|
||||
sudo journalctl --no-pager > $LOG_DIR/syslog.txt
|
||||
if which journalctl &> /dev/null; then
|
||||
sudo journalctl --no-pager > $LOG_DIR/syslog.txt
|
||||
fi
|
||||
|
||||
# rabbitmq logs
|
||||
if [ -d /var/log/rabbitmq ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user