Fixing a strip glitch in `sys_command()` causing certain output to get truncated in unwanted places (like fstab)
This commit is contained in:
parent
5c8d24a329
commit
21cfe5708c
|
|
@ -171,7 +171,7 @@ class sys_command():#Thread):
|
||||||
while alive and not self.kwargs['emulate']:
|
while alive and not self.kwargs['emulate']:
|
||||||
for fileno, event in poller.poll(0.1):
|
for fileno, event in poller.poll(0.1):
|
||||||
try:
|
try:
|
||||||
output = os.read(child_fd, 8192).strip()
|
output = os.read(child_fd, 8192)
|
||||||
self.trace_log += output
|
self.trace_log += output
|
||||||
except OSError:
|
except OSError:
|
||||||
alive = False
|
alive = False
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ class Installer():
|
||||||
fstab = sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}').trace_log
|
fstab = sys_command(f'/usr/bin/genfstab {flags} {self.mountpoint}').trace_log
|
||||||
print(fstab)
|
print(fstab)
|
||||||
with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab_fh:
|
with open(f"{self.mountpoint}/etc/fstab", 'ab') as fstab_fh:
|
||||||
fstab.write(fstab)
|
fstab_fh.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}')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue