As in2a5fcfae02and in3e67e5c992using /usr/bin/env allows bash to be looked up in PATH rather than being hard-coded. As with the previous changes the same arguments apply - distributions have scripts to rewrite shebangs on installation and they know what locations to rely on. - For tests/compilation we should rather rely on the user to have setup there PATH correctly. In particular this makes testing from git easier on NixOS where do not provide /bin/bash to improve compose-ability.
20 lines
373 B
Bash
Executable File
20 lines
373 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ex
|
|
|
|
systemd-analyze log-level debug
|
|
|
|
systemd-run -p LogNamespace=foobar echo "hello world"
|
|
|
|
journalctl --namespace=foobar --sync
|
|
journalctl --namespace=foobar > /tmp/hello-world
|
|
journalctl > /tmp/no-hello-world
|
|
|
|
grep "hello world" /tmp/hello-world
|
|
! grep "hello world" /tmp/no-hello-world
|
|
|
|
systemd-analyze log-level info
|
|
|
|
echo OK > /testok
|
|
|
|
exit 0
|