]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: explicitly load units beforehand so that DeviceAllow= syntax works
authorLennart Poettering <lennart@poettering.net>
Tue, 23 Jul 2019 11:11:09 +0000 (13:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 Jul 2019 11:30:56 +0000 (13:30 +0200)
Yuck, but I don't see any prettier solution.

Fixes: #13130
units/systemd-nspawn@.service.in

index c3194d4f21d4cfa1ebf80a25dc810a8617c3471c..2473a730b472526e8d61373ed5e19748cfa0cb69 100644 (file)
@@ -16,6 +16,8 @@ After=network.target systemd-resolved.service
 RequiresMountsFor=/var/lib/machines
 
 [Service]
+# Make sure the DeviceAllow= lines below can properly resolve the 'block-loop' expression (and others)
+ExecStartPre=-/sbin/modprobe -abq tun loop dm-mod
 ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth -U --settings=override --machine=%i
 KillMode=mixed
 Type=notify