]> git.ipfire.org Git - thirdparty/systemd.git/blob - test/test-execute/exec-temporaryfilesystem-options.service
b7a5baf93ade5b37d2d452a0ea286d74584f7bab
[thirdparty/systemd.git] / test / test-execute / exec-temporaryfilesystem-options.service
1 [Unit]
2 Description=Test for TemporaryFileSystem with mount options
3
4 [Service]
5 Type=oneshot
6
7 # The mount options default to "mode=0755,nodev,strictatime".
8 # Let's override some of them, and test the behaviour of "ro".
9 TemporaryFileSystem=/var:ro,mode=0700,nostrictatime
10
11 # Check /proc/self/mountinfo
12 ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
13 ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)mode=700(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
14
15 ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
16 ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)nodev(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
17 ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 ~ /(^|,)strictatime(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'