mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
9323298657
This makes test-execute work on SELinux enabled systems. Fixes the issue reported at https://github.com/systemd/systemd/pull/7908#discussion_r169583540
18 lines
939 B
Desktop File
18 lines
939 B
Desktop File
[Unit]
|
|
Description=Test for TemporaryFileSystem with mount options
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
|
|
# 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
|
|
|
|
# Check /proc/self/mountinfo
|
|
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)" = ""'
|
|
|
|
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)" = ""'
|