]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
portable: Don't fail if /etc/resolv.conf doesn't exist
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 25 Apr 2024 11:49:01 +0000 (13:49 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 25 Apr 2024 15:06:42 +0000 (17:06 +0200)
The portable profiles assume /etc/resolv.conf exists, which isn't
always the case. Let's mark the mounts as optional so we don't fail
to start the unit if /etc/resolv.conf doesn't exist.

src/portable/profile/default/service.conf
src/portable/profile/trusted/service.conf

index 230aa6078104cf54bb6e51c4ca87c2917c218a51..5c447d664174b037163df051d6adb27ca1f88c62 100644 (file)
@@ -4,7 +4,7 @@
 MountAPIVFS=yes
 BindReadOnlyPaths=/dev/log /run/systemd/journal/socket /run/systemd/journal/stdout
 BindReadOnlyPaths=/etc/machine-id
-BindReadOnlyPaths=/etc/resolv.conf
+BindReadOnlyPaths=-/etc/resolv.conf
 BindReadOnlyPaths=/run/dbus/system_bus_socket
 DynamicUser=yes
 RemoveIPC=yes
index 04deeb2262e1696141b430bd19d01343be3bd49b..144d4f6c233da9928a5c634890be6e9e6de5f57c 100644 (file)
@@ -5,4 +5,4 @@ MountAPIVFS=yes
 PrivateTmp=yes
 BindPaths=/run
 BindReadOnlyPaths=/etc/machine-id
-BindReadOnlyPaths=/etc/resolv.conf
+BindReadOnlyPaths=-/etc/resolv.conf