]>
Commit | Line | Data |
---|---|---|
663996b3 MS |
1 | # This file is part of systemd. |
2 | # | |
3 | # systemd is free software; you can redistribute it and/or modify it | |
4 | # under the terms of the GNU Lesser General Public License as published by | |
5 | # the Free Software Foundation; either version 2.1 of the License, or | |
6 | # (at your option) any later version. | |
7 | ||
8 | [Unit] | |
e735f4d4 | 9 | Description=Container %I |
663996b3 | 10 | Documentation=man:systemd-nspawn(1) |
e735f4d4 MP |
11 | PartOf=machines.target |
12 | Before=machines.target | |
e3bff60a | 13 | After=network.target |
663996b3 MS |
14 | |
15 | [Service] | |
d9dfd233 | 16 | ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth --settings=override --machine=%I |
60f067b4 | 17 | KillMode=mixed |
663996b3 | 18 | Type=notify |
e842803a MB |
19 | RestartForceExitStatus=133 |
20 | SuccessExitStatus=133 | |
e3bff60a | 21 | Slice=machine.slice |
f47781d8 | 22 | Delegate=yes |
663996b3 | 23 | |
e3bff60a MP |
24 | # Enforce a strict device policy, similar to the one nspawn configures |
25 | # when it allocates its own scope unit. Make sure to keep these | |
26 | # policies in sync if you change them! | |
27 | DevicePolicy=strict | |
28 | DeviceAllow=/dev/null rwm | |
29 | DeviceAllow=/dev/zero rwm | |
30 | DeviceAllow=/dev/full rwm | |
31 | DeviceAllow=/dev/random rwm | |
32 | DeviceAllow=/dev/urandom rwm | |
33 | DeviceAllow=/dev/tty rwm | |
34 | DeviceAllow=/dev/net/tun rwm | |
35 | DeviceAllow=/dev/pts/ptmx rw | |
36 | DeviceAllow=char-pts rw | |
37 | ||
663996b3 | 38 | [Install] |
e735f4d4 | 39 | WantedBy=machines.target |