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.feeds+github@gmail.com>2020-07-22 01:03:14 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-07-22 01:03:14 +0000
commit0cd088572d4c9a45711eb7a358cb4c2edd98e450 (patch)
tree19d3a2664050dbf35fd2b76b862d94c9f260f412 /archinstall/lib/installer.py
parentc884a2523746892d15257b68f6f3681119681cf3 (diff)
New feature: application profiles now support .py as well. Also fixed a sys.path issue where an installed version of archinstall would have precedence over the local version when profiles were being executed (because profiles were living in a unknown relative working directory, the caller to those profiles have to make sure .archinstall exists in sys.path before calling said profile)
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 90849bf2..9247c635 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -91,6 +91,12 @@ class Installer():
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} ln -s /usr/share/zoneinfo/{zone} /etc/localtime'))
return True
+ def run_command(self, cmd):
+ return sys_command(f'/usr/bin/arch-chroot {self.mountpoint} {cmd}')
+
+ def arch_chroot(self, cmd):
+ return self.run_command(cmd)
+
def minimal_installation(self):
self.pacstrap('base base-devel linux linux-firmware btrfs-progs efibootmgr nano'.split(' '))
self.genfstab()
@@ -158,13 +164,13 @@ class Installer():
raise RequirementError(f'Could not identify the UUID of {self.partition}, there for {self.mountpoint}/boot/loader/entries/arch.conf will be broken until fixed.')
def add_additional_packages(self, *packages):
- self.pacstrap(*packages)
+ return self.pacstrap(*packages)
def install_profile(self, profile):
profile = Profile(self, profile)
log(f'Installing network profile {profile}')
- profile.install()
+ return profile.install()
def user_create(self, user :str, password=None, groups=[]):
log(f'Creating user {user}')