Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorGiancarlo Razzolini <grazzolini@archlinux.org>2021-01-26 10:18:56 -0300
committerGiancarlo Razzolini <grazzolini@archlinux.org>2021-01-26 10:18:56 -0300
commit66293c15f6bb4199d07521f3358f65affec3cf5e (patch)
tree8c924f79a9d9b645fc094282677d38811de93eb8 /archinstall
parent30e66e49ecde503bf0706a363a41d4cbff174f4a (diff)
installer: Make sure networkd and resolved are enabled
Fixed the logic so systemd-networkd and systemd-resolved will always be enabled when the user picks the option to copy files from the ISO. The previous behavior was to enable them only if a wireless network was configured with iwd.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/installer.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 21c1b5d9..fb9e9724 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -224,8 +224,6 @@ class Installer():
# base is not installed yet.
def post_install_enable_iwd_service(*args, **kwargs):
self.enable_service('iwd')
- self.enable_service('systemd-networkd')
- self.enable_service('systemd-resolved')
self.post_base_install.append(post_install_enable_iwd_service)
# Otherwise, we can go ahead and add the required package
@@ -233,8 +231,6 @@ class Installer():
else:
self.pacstrap('iwd')
self.enable_service('iwd')
- self.enable_service('systemd-networkd')
- self.enable_service('systemd-resolved')
for psk in psk_files:
shutil.copy2(psk, f"{self.mountpoint}/var/lib/iwd/{os.path.basename(psk)}")
@@ -247,6 +243,19 @@ class Installer():
for netconf_file in netconfigurations:
shutil.copy2(netconf_file, f"{self.mountpoint}/etc/systemd/network/{os.path.basename(netconf_file)}")
+ if enable_services:
+ # If we haven't installed the base yet (function called pre-maturely)
+ if self.helper_flags.get('base', False) is False:
+ def post_install_enable_networkd_resolved(*args, **kwargs):
+ self.enable_service('systemd-networkd')
+ self.enable_service('systemd-resolved')
+
+ self.post_base_install.append(post_install_enable_networkd_resolved)
+ # Otherwise, we can go ahead and enable the services
+ else:
+ self.enable_service('systemd-networkd')
+ self.enable_service('systemd-resolved')
+
return True
def minimal_installation(self):