mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 07:51:21 +03:00
fd3561bae0
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.
11 lines
153 B
Bash
Executable File
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
|