1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
systemd/test/units/testsuite-44.sh

20 lines
436 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -eux
systemd-analyze log-level debug
systemd-run --wait -p LogNamespace=foobar echo "hello world"
journalctl --namespace=foobar --sync
journalctl -o cat --namespace=foobar >/tmp/hello-world
journalctl -o cat >/tmp/no-hello-world
grep "^hello world$" /tmp/hello-world
grep "^hello world$" /tmp/no-hello-world && { echo 'unexpected success'; exit 1; }
systemd-analyze log-level info
echo OK >/testok
exit 0