2020-03-04 09:35:06 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-10-17 16:13:06 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2019-08-22 15:22:54 +00:00
|
|
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
|
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
2021-04-09 17:39:41 +00:00
|
|
|
set -eux
|
2019-08-22 15:22:54 +00:00
|
|
|
set -o pipefail
|
|
|
|
|
2023-05-08 20:38:34 +00:00
|
|
|
# Test RuntimeDirectoryPreserve=yes
|
|
|
|
|
2019-08-22 15:22:54 +00:00
|
|
|
systemd-mount -p RuntimeDirectory=hoge -p RuntimeDirectoryPreserve=yes -t tmpfs tmpfs /tmp/aaa
|
|
|
|
|
|
|
|
touch /run/hoge/foo
|
|
|
|
touch /tmp/aaa/bbb
|
|
|
|
|
|
|
|
systemctl restart tmp-aaa.mount
|
|
|
|
|
|
|
|
test -e /run/hoge/foo
|
2021-04-07 21:24:25 +00:00
|
|
|
test ! -e /tmp/aaa/bbb
|