2021-04-09 17:39:41 +00:00
|
|
|
#!/bin/bash
|
2021-10-17 16:13:06 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2018-11-20 15:32:23 +00:00
|
|
|
#
|
|
|
|
# Verifies the issues described by https://github.com/systemd/systemd/issues/10191
|
2021-04-09 17:39:41 +00:00
|
|
|
set -eux
|
|
|
|
set -o pipefail
|
2018-11-20 15:32:23 +00:00
|
|
|
|
|
|
|
rm -rf /tmp/test-prefix
|
|
|
|
|
|
|
|
mkdir /tmp/test-prefix
|
|
|
|
touch /tmp/test-prefix/file
|
|
|
|
|
|
|
|
systemd-tmpfiles --remove - <<EOF
|
|
|
|
r /tmp/test-prefix
|
|
|
|
r /tmp/test-prefix/file
|
|
|
|
EOF
|
|
|
|
|
2021-04-07 21:24:25 +00:00
|
|
|
test ! -f /tmp/test-prefix/file
|
|
|
|
test ! -f /tmp/test-prefix
|
2018-11-20 15:32:23 +00:00
|
|
|
|
|
|
|
mkdir /tmp/test-prefix
|
|
|
|
touch /tmp/test-prefix/file
|
|
|
|
|
|
|
|
systemd-tmpfiles --remove - <<EOF
|
|
|
|
r /tmp/test-prefix/file
|
|
|
|
r /tmp/test-prefix
|
|
|
|
EOF
|
|
|
|
|
2021-04-07 21:24:25 +00:00
|
|
|
test ! -f /tmp/test-prefix/file
|
|
|
|
test ! -f /tmp/test-prefix
|