1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
systemd-stable/test/TEST-31-DEVICE-ENUMERATION/testsuite.sh
Zbigniew Jędrzejewski-Szmek fd3561bae0 test/TEST-31-DEVICE-ENUMERATION: do not use -x to avoid grep loop
https://github.com/systemd/systemd/pull/13746#issuecomment-539410752:
> [grep] now matches the grep command itself, as it's logged into journal as well, thanks to set -x.

Also, use journalctl --grep and -t to make things a bit quicker.
2019-10-08 11:11:49 +02:00

11 lines
153 B
Bash
Executable File

#!/bin/bash
set -e
set -o pipefail
if journalctl -b -t systemd --grep '\.device: Changed plugged -> dead'; then
exit 1
fi
echo OK > /testok
exit 0