mirror of
https://github.com/containers/podman
synced 2024-10-20 17:23:30 +00:00
4e9f5e5f2b
Signed-off-by: Chris Evich <cevich@redhat.com>
37 lines
1 KiB
Bash
Executable file
37 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
source $(dirname $0)/lib.sh
|
|
|
|
req_env_var CIRRUS_WORKING_DIR OS_RELEASE_ID
|
|
|
|
# Assume there are other log collection commands to follow - Don't
|
|
# let one break another that may be useful, but also keep any
|
|
# actual script-problems fatal so they are noticed right away.
|
|
showrun() {
|
|
echo '+ '$(printf " %q" "$@")
|
|
set +e
|
|
echo '------------------------------------------------------------'
|
|
"$@"
|
|
local status=$?
|
|
[[ $status -eq 0 ]] || \
|
|
echo "[ rc = $status -- proceeding anyway ]"
|
|
echo '------------------------------------------------------------'
|
|
set -e
|
|
}
|
|
|
|
case $1 in
|
|
audit)
|
|
case $OS_RELEASE_ID in
|
|
ubuntu) showrun cat /var/log/kern.log ;;
|
|
fedora) showrun cat /var/log/audit/audit.log ;;
|
|
*) bad_os_id_ver ;;
|
|
esac
|
|
;;
|
|
df) showrun df -lhTx tmpfs ;;
|
|
ginkgo) showrun cat $CIRRUS_WORKING_DIR/test/e2e/ginkgo-node-*.log ;;
|
|
journal) showrun journalctl -b ;;
|
|
*) die 1 "Warning, $(basename $0) doesn't know how to handle the parameter '$1'"
|
|
esac
|