From: Daan De Meyer Date: Thu, 25 Apr 2024 11:49:01 +0000 (+0200) Subject: portable: Don't fail if /etc/resolv.conf doesn't exist X-Git-Tag: v256-rc1~9^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f449a29bb9914f2645f37a3e177afef1e2c0536a;p=thirdparty%2Fsystemd.git portable: Don't fail if /etc/resolv.conf doesn't exist 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. --- diff --git a/src/portable/profile/default/service.conf b/src/portable/profile/default/service.conf index 230aa607810..5c447d66417 100644 --- a/src/portable/profile/default/service.conf +++ b/src/portable/profile/default/service.conf @@ -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 diff --git a/src/portable/profile/trusted/service.conf b/src/portable/profile/trusted/service.conf index 04deeb2262e..144d4f6c233 100644 --- a/src/portable/profile/trusted/service.conf +++ b/src/portable/profile/trusted/service.conf @@ -5,4 +5,4 @@ MountAPIVFS=yes PrivateTmp=yes BindPaths=/run BindReadOnlyPaths=/etc/machine-id -BindReadOnlyPaths=/etc/resolv.conf +BindReadOnlyPaths=-/etc/resolv.conf