Skip to content

Commit

Permalink
portable: Don't fail if /etc/resolv.conf doesn't exist
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DaanDeMeyer committed Apr 25, 2024
1 parent cf5e1b5 commit f449a29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/portable/profile/default/service.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/portable/profile/trusted/service.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ MountAPIVFS=yes
PrivateTmp=yes
BindPaths=/run
BindReadOnlyPaths=/etc/machine-id
BindReadOnlyPaths=/etc/resolv.conf
BindReadOnlyPaths=-/etc/resolv.conf

0 comments on commit f449a29

Please sign in to comment.