From f449a29bb9914f2645f37a3e177afef1e2c0536a Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 25 Apr 2024 13:49:01 +0200 Subject: [PATCH] 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. --- src/portable/profile/default/service.conf | 2 +- src/portable/profile/trusted/service.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.3