Debian Codegraph @

test/testdata/test-execute/exec-temporaryfilesystem-options.service

raw
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2 [Unit]
3 Description=Test for TemporaryFileSystem with mount options
4
5 [Service]
6 Type=oneshot
7
8 # The mount options default to "mode=0755,nodev,strictatime".
9 # Let's override some of them, and test "ro".
10 TemporaryFileSystem=/var:ro,mode=0700,nostrictatime
11
12 # Check /proc/self/mountinfo
13 ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)mode=700(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
14
15 ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
16 ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)nodev(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
17 ExecStart=bash -x -c 'test "$$(awk \'$$5 == "/var" && $$6 ~ /(^|,)strictatime(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'