1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
systemd/test/test-execute/exec-bind-paths.service
2017-10-12 13:25:06 +09:00

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