Blame tests/p_systemd/25-journalctl.sh

Rene Diepstraten 8c0afd
#!/bin/bash
Rene Diepstraten 8c0afd
# Author: Rene Diepstraten <rene@renediepstraten.nl>
Rene Diepstraten 8c0afd
Rene Diepstraten 8c0afd
[ ${centos_ver} -lt 7 ] && exit
Rene Diepstraten 8c0afd
t_Log "Running $0 - Testing journalctl for teststring"
Rene Diepstraten 8c0afd
40b4c8
if [ "$CONTAINERTEST" -eq "1" ]; then
40b4c8
    t_Log "Running in container -> SKIP"
40b4c8
    exit 0
40b4c8
fi
40b4c8
Rene Diepstraten 8c0afd
teststring=098f6bcd4621d373cade4e832627b4f6
Rene Diepstraten 8c0afd
timenow=$(date +'%T')
Rene Diepstraten 8c0afd
echo ${teststring} > /dev/kmsg
Rene Diepstraten 8c0afd
journalctl --since ${timenow} | grep -q ${teststring}
Rene Diepstraten 8c0afd
Rene Diepstraten 8c0afd
t_CheckExitStatus $?