index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-01-26 00:11:17 +0100 |
---|---|---|
committer | Anton Hvornum <anton@hvornum.se> | 2021-01-26 00:11:17 +0100 |
commit | a3d9ad9f3f48c9bd06edb6c1ec58b55ac4bb6741 (patch) | |
tree | 0b3b1dfb0bdc8e416d2777419c7401f328c9dc76 | |
parent | 405794d53f1f47e2a19a906dbdfa6ad39ea79c17 (diff) |
-rw-r--r-- | archinstall/lib/installer.py | 26 |
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index c8cf40d0..e1a37f32 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -190,20 +190,24 @@ class Installer(): if not os.path.isdir(f"{self.mountpoint}/var/lib/iwd"): os.makedirs(f"{self.mountpoint}/var/lib/iwd") - self.base_packages.append('iwd') - - if enable_services and self.helper_flags.get('base', False) is False: - # This function will be called after minimal_installation() - # as a hook for post-installs. This hook is only needed if - # base is not installed yet. - def post_install_enable_iwd_service(*args, **kwargs): + if enable_services: + # If we haven't installed the base yet (function called pre-maturely) + if self.helper_flags.get('base', False) is False: + self.base_packages.append('iwd') + # This function will be called after minimal_installation() + # as a hook for post-installs. This hook is only needed if + # base is not installed yet. + def post_install_enable_iwd_service(*args, **kwargs): + self.enable_service('iwd') + + self.post_base_install.append(post_install_enable_iwd_service) + # Otherwise, we can go ahead and add the required package + # and enable it's service: + else: + self.pacstrap(self.base_packages) self.enable_service('iwd') - self.post_base_install.append(post_install_enable_iwd_service) - elif enable_services and self.helper_flags.get('base', False) is True: - self.enable_service('iwd') - for psk in psk_files: shutil.copy2(psk, f"{self.mountpoint}/var/lib/iwd/{os.path.basename(psk)}") |