#988496 live-boot: /etc/resolv.conf empty when using resolvconf

Package:
live-boot
Source:
live-boot
Submitter:
Benjamin Drung
Date:
2021-05-14 08:54:04 UTC
Severity:
important
Tags:
#988496#5
Date:
2021-05-14 08:50:37 UTC
From:
To:
Hi,

We are using live-boot together with resolvconf. Our
/etc/network/interfaces is generated on boot and uses a static config
without DHCP. So the DCHP client in the initrd will be the only DHCP
client.

Once the system is booted, /etc/resolv.conf stays empty.

When using resolvconf, writing the resolv.conf settings into
`/etc/resolvconf/resolv.conf.d/base` is not enough. `/etc/resolv.conf`
pointing to `/run/resolvconf/resolv.conf` will stay empty.

So in addition to copying resolv.conf into
`/etc/resolvconf/resolv.conf.d/base`, generate
`/run/resolvconf/resolv.conf` by adding the head and tail.

A tested patch is attached that generates /run/resolvconf/resolv.conf
when using resolvconf.