1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-04 22:21:55 +03:00
systemd/test/test-execute/exec-protectkernelmodules-yes-mount-propagation.service

8 lines
384 B
SYSTEMD
Raw Normal View History

[Unit]
Description=Test to make sure that passing ProtectKernelModules=yes disconnect mount propagation
[Service]
ProtectKernelModules=yes
ExecStart=/bin/sh -x -c 'd=$$(mktemp -d -p /tmp); trap "umount \'$$d\' && rmdir \'$$d\'" EXIT; mount -t tmpfs tmpfs "$$d"; grep "$$d" /proc/self/mountinfo && ! grep "$$d" /proc/$${PPID}/mountinfo && ! grep "$$d" /proc/1/mountinfo'
Type=oneshot