File: exec-temporaryfilesystem-usr.service

package info (click to toggle)
systemd 241-7~deb10u8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 59,140 kB
  • sloc: ansic: 355,293; xml: 59,096; python: 21,623; sh: 6,686; perl: 1,649; makefile: 265; awk: 90; lisp: 13; sed: 1
file content (15 lines) | stat: -rw-r--r-- 451 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[Unit]
Description=Test for TemporaryFileSystem on /usr

[Service]
Type=oneshot

# Check TemporaryFileSystem= are empty
ExecStart=/bin/sh -c 'for i in $$(ls -A /usr); do test $$i = lib -o $$i = lib64 -o $$i = bin -o $$i = sbin || false; done'

# Cannot create files under /usr
ExecStart=/bin/sh -c '! touch /usr/hoge'
ExecStart=/bin/sh -c '! touch /usr/bin/hoge'

TemporaryFileSystem=/usr:ro
BindReadOnlyPaths=-/usr/lib -/usr/lib64 /usr/bin /usr/sbin