More debugging

This commit is contained in:
Anton Hvornum 2020-12-07 20:31:18 +01:00
parent 881d77064c
commit ada7a0515b
1 changed files with 4 additions and 4 deletions

View File

@ -118,10 +118,10 @@ class Installer():
def genfstab(self, flags='-pU'): def genfstab(self, flags='-pU'):
self.log(f"Updating {self.mountpoint}/etc/fstab", level=LOG_LEVELS.Info) self.log(f"Updating {self.mountpoint}/etc/fstab", level=LOG_LEVELS.Info)
with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab: fstab = sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}').trace_log:
for line in sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}'): print(fstab)
print('Writing fstab:', line + b'\n') with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab_fh:
fstab.write(line + b'\n') fstab.write(fstab)
if not os.path.isfile(f'{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}') raise RequirementError(f'Could not generate fstab, strapping in packages most likely failed (disk out of space?)\n{o}')