mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 16:21:26 +03:00
d053b72bdd
Follow-up for a8cabc612b
.
15 lines
687 B
Desktop File
15 lines
687 B
Desktop File
[Service]
|
|
Type=oneshot
|
|
# Create a file in /tmp/test-exec_bind_paths
|
|
ExecStart=/bin/sh -c 'touch /tmp/test-exec_bind_paths/thisisasimpletest'
|
|
# Then, the file can be access through /tmp
|
|
ExecStart=/bin/sh -c 'test -f /tmp/thisisasimpletest'
|
|
# Also, through /tmp/test-exec_bind_readonly_paths
|
|
ExecStart=/bin/sh -c 'test -f /tmp/test-exec_bind_readonly_paths/thisisasimpletest'
|
|
# The file cannot modify through /tmp/test-exec_bind_readonly_paths
|
|
ExecStart=/bin/sh -x -c '! touch /tmp/test-exec_bind_readonly_paths/thisisasimpletest'
|
|
# Cleanup
|
|
ExecStart=/bin/sh -c 'rm /tmp/thisisasimpletest'
|
|
BindPaths=/tmp:/tmp/test-exec_bind_paths
|
|
BindReadOnlyPaths=/tmp:/tmp/test-exec_bind_readonly_paths
|