Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-12-07 16:36:35 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-12-07 16:36:35 +0100
commit63c6e0464b7915fcc107ffe50247aa86e706315a (patch)
tree7f40644ba94b511a929340b687c35b0cd82780fc /archinstall/lib
parente637852df0a2563efe5df5548113376c7f3cf52f (diff)
Making sure installation.mount() also triggers genfstab.
Since it's a installation specific mount, we need to re-create genfstab. Also corrected genfstab flags as well as added an option to override the >> (append) operator to become a write-over operator.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/installer.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 7208a7fd..81c8b3a7 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -94,6 +94,7 @@ class Installer():
os.makedirs(f'{self.mountpoint}/srv/http')
partition.mount(f'{self.mountpoint}/srv/http')
+ self.genfstab(output='>') # Replace any existing entries
def post_install_check(self, *args, **kwargs):
return [step for step, flag in self.helper_flags.items() if flag is False]
@@ -113,8 +114,8 @@ class Installer():
def set_mirrors(self, mirrors):
return use_mirrors(mirrors, destination=f'{self.mountpoint}/etc/pacman.d/mirrorlist')
- def genfstab(self, flags='-Pu'):
- o = b''.join(sys_command(f'/usr/bin/genfstab -pU {self.mountpoint} >> {self.mountpoint}/etc/fstab'))
+ def genfstab(self, flags='-pU', output='>>'):
+ o = b''.join(sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint} {output} {self.mountpoint}/etc/fstab'))
if not os.path.isfile(f'{self.mountpoint}/etc/fstab'):
raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{o}')
return True