Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions archinstall/lib/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,13 @@ def post_install_enable_iwd_service(*args: str, **kwargs: str) -> None:
for psk in psk_files:
shutil.copy2(psk, f'{self.target}/var/lib/iwd/{os.path.basename(psk)}')

# Enable systemd-resolved by (forcefully) setting a symlink
# For further details see https://wiki.archlinux.org/title/Systemd-resolved#DNS
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)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is actually unnecessary, since the first boot would've created the file anyway (when it doesn't exist).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im guessing it should only be handled if chrooting into the (pre)install then ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


# Copy (if any) systemd-networkd config files
if netconfigurations := glob.glob('/etc/systemd/network/*'):
if not os.path.isdir(f'{self.target}/etc/systemd/network/'):
Expand Down