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-29 11:32:21 +0000
committerGitHub <noreply@github.com>2021-04-29 13:32:21 +0200
commit0ebc6be7ae3b153f2baad722a08a2019bb04c905 (patch)
tree97ba47b66a74c69e22c8ec70d2081bce28a6111a /archinstall/lib/installer.py
parentaa0f4327260ab39077999859c593ed6d5c12822c (diff)
Added a postgresql application profile. (#383)
* Added a postgres application profile. Also introducing runas to the arch_chroot of the installation, to run commands as emulated users. This is highly WIP at the moment. * Fixing top-level-listing of profiles. As well as testing some postgres installation steps. * Removed dupe functions. * Added safety check in case a comment mentions the top level profile thing. * Patching namespace corruption. * Avoiding runtime collision due to installation not being initiated yet. * Allow for parameterization of filesystem in guided. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com>
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index dbc6d1b4..a7b36481 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -196,6 +196,9 @@ class Installer():
return sys_command(f'/usr/bin/arch-chroot {self.target} {cmd}')
def arch_chroot(self, cmd, *args, **kwargs):
+ if 'runas' in kwargs:
+ cmd = f"su - {kwargs['runas']} -c \"{cmd}\""
+
return self.run_command(cmd)
def drop_to_shell(self):