1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00
systemd-stable/test/test-execute/exec-readonlypaths-simple.service

13 lines
465 B
SYSTEMD
Raw Normal View History

# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Test for ReadOnlyPaths=
[Service]
Type=oneshot
# This should work, as we explicitly disable the effect of ReadOnlyPaths=
2017-10-12 07:26:39 +03:00
ExecStart=+/bin/sh -c 'touch /tmp/thisisasimpletest'
# This should also work, as we do not disable the effect of ReadOnlyPaths= but invert the exit code
2017-10-12 07:26:39 +03:00
ExecStart=/bin/sh -x -c '! touch /tmp/thisisasimpletest'
ExecStart=+/bin/sh -c 'rm /tmp/thisisasimpletest'
ReadOnlyPaths=/tmp