fstab incorrectly updated since many version ago
Updated `genfstab()` to approprately generate a correct fstab for mounted filesystems used in `installation.mountpoint`.
This commit is contained in:
parent
7097fb9ce3
commit
ba863c341d
|
|
@ -118,9 +118,9 @@ 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)
|
||||||
|
|
||||||
print(f'/usr/bin/genfstab {flags} {self.mountpoint} >> {self.mountpoint}/etc/fstab')
|
o = b''.join(sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}'))
|
||||||
o = b''.join(sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint} >> {self.mountpoint}/etc/fstab'))
|
with open(f"{self.mountpoint}/etc/fstab", 'a') as fstab:
|
||||||
print(o)
|
fstab.write(f"\n{o.decode('UTF-8')}")
|
||||||
|
|
||||||
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}')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue