File: exec-readonlypaths-simple.service

package info (click to toggle)
systemd 247.3-7%2Bdeb11u4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye-updates
  • size: 71,320 kB
  • sloc: ansic: 459,704; xml: 82,646; python: 24,815; sh: 8,987; perl: 2,684; makefile: 275; awk: 93; lisp: 13; sed: 1
file content (11 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
[Unit]
Description=Test for ReadOnlyPaths=

[Service]
Type=oneshot
# This should work, as we explicitly disable the effect of ReadOnlyPaths=
ExecStart=+/bin/sh -c 'touch /tmp/thisisasimpletest'
# This should also work, as we do not disable the effect of ReadOnlyPaths= but invert the exit code
ExecStart=/bin/sh -x -c '! touch /tmp/thisisasimpletest'
ExecStart=+/bin/sh -c 'rm /tmp/thisisasimpletest'
ReadOnlyPaths=/tmp