HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

test/test-execute/exec-readonlypaths-simple.service

Git blob: 53ba3157705db578022363daef7499a21ff4008d

Lines 1–13 of 13

# 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=
ExecStart=+bash -c 'touch /tmp/thisisasimpletest'
# This should also work, as we do not disable the effect of ReadOnlyPaths= but invert the exit code
ExecStart=bash -x -c '! touch /tmp/thisisasimpletest'
ExecStart=+bash -c 'rm /tmp/thisisasimpletest'
ReadOnlyPaths=/tmp