lib/network: adds symlink to configure systemd-resovled properly - #4052
Conversation
|
Can you provide a description of the PR and the problem |
I filled in the blanks as I forced poor @wahrwolf to submit this PR 😅 Sorry for the confusion! |
|
I tested the change and after the first reboot Here is the weird part: Everything looks normal after the reboot, so I assume this can be safely ignored |
| resolv_config_path = Path(f'{self.target}/etc/resolv.conf') | ||
| if resolv_config_path.exists(): | ||
| os.unlink(resolv_config_path) | ||
| os.symlink('/run/systemd/resolve/stub-resolv.conf', resolv_config_path) |
There was a problem hiding this comment.
this is actually unnecessary, since the first boot would've created the file anyway (when it doesn't exist).
There was a problem hiding this comment.
Im guessing it should only be handled if chrooting into the (pre)install then ?
There was a problem hiding this comment.
this is actually unnecessary, since the first boot would've created the file anyway (when it doesn't exist).
The problem is that the core package/filesystem contains the file, so it won't be created on the first boot. And it's better to be explicit here I think.
When "Copy network config from ISO" is selected, it sets up
systemd-resolvedandsystemd-networkd, however,systemd-resolvedrequiresresolve.confto be a stub in order to work properly.This PR addresses the issue that it's currently not a stub, but a core filesystem file meant for other types of resolvers.