summaryrefslogtreecommitdiffstats
path: root/test/test-execute/exec-dynamicuser-statedir.service
blob: b33b4da74af9f771601eabfebbb2a70af9799d8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Test DynamicUser= with StateDirectory=

[Service]
ExecStart=test -w /var/lib/waldo
ExecStart=test -w /var/lib/quux/pief
ExecStart=test -w /var/lib/aaa
ExecStart=test -w /var/lib/aaa/bbb
ExecStart=test -w /var/lib/aaa/ccc
ExecStart=test -w /var/lib/xxx
ExecStart=test -w /var/lib/xxx/yyy
ExecStart=test -w /var/lib/xxx/zzz
ExecStart=test -w /var/lib/aaa/111
ExecStart=test -w /var/lib/aaa/222
ExecStart=test -w /var/lib/aaa/333

ExecStart=test -d /var/lib/waldo
ExecStart=test -d /var/lib/quux/pief
ExecStart=test -d /var/lib/aaa
ExecStart=test -d /var/lib/aaa/bbb
ExecStart=test -d /var/lib/aaa/ccc
ExecStart=test -d /var/lib/xxx
ExecStart=test -d /var/lib/xxx/yyy
ExecStart=test -d /var/lib/xxx/zzz
ExecStart=test -L /var/lib/aaa/111
ExecStart=test -L /var/lib/aaa/222
ExecStart=test -L /var/lib/aaa/333

ExecStart=touch /var/lib/waldo/hoge
ExecStart=touch /var/lib/quux/pief/hoge
ExecStart=touch /var/lib/aaa/hoge
ExecStart=touch /var/lib/aaa/bbb/hoge
ExecStart=touch /var/lib/aaa/ccc/hoge
ExecStart=touch /var/lib/xxx/hoge
ExecStart=touch /var/lib/xxx/yyy/hoge
ExecStart=touch /var/lib/xxx/zzz/hoge
ExecStart=touch /var/lib/aaa/111/foo
ExecStart=touch /var/lib/aaa/222/foo
ExecStart=touch /var/lib/aaa/333/foo

ExecStart=test -f /var/lib/waldo/hoge
ExecStart=test -f /var/lib/quux/pief/hoge
ExecStart=test -f /var/lib/aaa/hoge
ExecStart=test -f /var/lib/aaa/bbb/hoge
ExecStart=test -f /var/lib/aaa/ccc/hoge
ExecStart=test -f /var/lib/xxx/hoge
ExecStart=test -f /var/lib/xxx/yyy/hoge
ExecStart=test -f /var/lib/xxx/zzz/hoge
ExecStart=test -f /var/lib/aaa/111/foo
ExecStart=test -f /var/lib/aaa/222/foo
ExecStart=test -f /var/lib/aaa/333/foo
ExecStart=test -f /var/lib/xxx/foo
ExecStart=test -f /var/lib/xxx/yyy/foo
ExecStart=test -f /var/lib/xxx/zzz/foo

ExecStart=test -f /var/lib/private/waldo/hoge
ExecStart=test -f /var/lib/private/quux/pief/hoge
ExecStart=test -f /var/lib/private/aaa/hoge
ExecStart=test -f /var/lib/private/aaa/bbb/hoge
ExecStart=test -f /var/lib/private/aaa/ccc/hoge
ExecStart=test -f /var/lib/private/xxx/hoge
ExecStart=test -f /var/lib/private/xxx/yyy/hoge
ExecStart=test -f /var/lib/private/xxx/zzz/hoge
ExecStart=test -f /var/lib/private/aaa/111/foo
ExecStart=test -f /var/lib/private/aaa/222/foo
ExecStart=test -f /var/lib/private/aaa/333/foo
ExecStart=test -f /var/lib/private/xxx/foo
ExecStart=test -f /var/lib/private/xxx/yyy/foo
ExecStart=test -f /var/lib/private/xxx/zzz/foo

ExecStart=sh -x -c 'test "$$STATE_DIRECTORY" = "%S/aaa:%S/aaa/bbb:%S/aaa/ccc:%S/quux/pief:%S/waldo:%S/xxx:%S/xxx/yyy:%S/xxx/zzz"'

Type=oneshot
DynamicUser=yes
StateDirectory=waldo quux/pief aaa/bbb aaa aaa/ccc xxx/yyy:aaa/111 xxx:aaa/222 xxx/zzz:aaa/333