2018-02-20 08:50:12 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Test for TemporaryFileSystem with mount options
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
|
2018-02-21 16:43:35 +01:00
|
|
|
# The mount options default to "mode=0755,nodev,strictatime".
|
|
|
|
# Let's override some of them, and test the behaviour of "ro".
|
|
|
|
TemporaryFileSystem=/var:ro,mode=0700,nostrictatime
|
|
|
|
|
2018-02-20 08:50:12 +01:00
|
|
|
# Check /proc/self/mountinfo
|
2018-02-22 01:02:12 +01:00
|
|
|
ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
|
|
|
|
ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)mode=700(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
|
2018-02-20 08:50:12 +01:00
|
|
|
|
2018-02-22 01:02:12 +01:00
|
|
|
ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
|
|
|
|
ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)nodev(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
|
|
|
|
ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 ~ /(^|,)strictatime(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""'
|