Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-30 17:04:55 +0200
committerAnton Hvornum <anton@hvornum.se>2021-04-30 17:04:55 +0200
commitcccb6bd5b31f32189bb13c81aa799b9ea7feff58 (patch)
tree9e70e1998c6ea7e09f9e14fef11a0d1e56205d26 /archinstall/lib/installer.py
parentacf85f254acc9e72b32c04c53c4517a5dad07df9 (diff)
Moved/Created mkinitcpio func
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 3dfcd32b..9f04a6f6 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -283,6 +283,14 @@ class Installer():
return False
+ def mkinitcpio(self, *flags):
+ with open(f'{self.target}/etc/mkinitcpio.conf', 'w') as mkinit:
+ mkinit.write(f"MODULES=({' '.join(self.MODULES)})\n")
+ mkinit.write(f"BINARIES=({' '.join(self.BINARIES)})\n")
+ mkinit.write(f"FILES=({' '.join(self.FILES)})\n")
+ mkinit.write(f"HOOKS=({' '.join(self.HOOKS)})\n")
+ sys_command(f'/usr/bin/arch-chroot {self.target} mkinitcpio {" ".join(flags)}')
+
def minimal_installation(self):
## Add necessary packages if encrypting the drive
## (encrypted partitions default to btrfs for now, so we need btrfs-progs)
@@ -340,12 +348,7 @@ class Installer():
# TODO: Use python functions for this
sys_command(f'/usr/bin/arch-chroot {self.target} chmod 700 /root')
- with open(f'{self.target}/etc/mkinitcpio.conf', 'w') as mkinit:
- mkinit.write(f"MODULES=({' '.join(self.MODULES)})\n")
- mkinit.write(f"BINARIES=({' '.join(self.BINARIES)})\n")
- mkinit.write(f"FILES=({' '.join(self.FILES)})\n")
- mkinit.write(f"HOOKS=({' '.join(self.HOOKS)})\n")
- sys_command(f'/usr/bin/arch-chroot {self.target} mkinitcpio -P')
+ self.mkinitcpio('-P')
self.helper_flags['base'] = True