From f69ad3954725da705a474c949b771906231b2fa4 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 8 Aug 2022 21:28:18 -0500 Subject: [PATCH] rootfs: Link /etc/resolv.conf to /run By default, Buildroot creates `/etc/resolv.conf` as a symlink to `/tmp/resolv.conf`. This allows it to be modified at runtime, even if `/` is on a read-only filesystem (assuming `/tmp` is not). Unfortunately, this causes problems for systemd units with `PrivateTmp=yes`, because they are not able to read the `resolv.conf` file. A more appropriate location for the writable `resolv.conf` is `/run`. This filesystem is not affected by the `PrivateTmp` setting, and is always available to units. --- rootfs/overlay/etc/resolv.conf | 1 + 1 file changed, 1 insertion(+) create mode 120000 rootfs/overlay/etc/resolv.conf diff --git a/rootfs/overlay/etc/resolv.conf b/rootfs/overlay/etc/resolv.conf new file mode 120000 index 0000000..2ce2910 --- /dev/null +++ b/rootfs/overlay/etc/resolv.conf @@ -0,0 +1 @@ +../run/resolv.conf \ No newline at end of file