Fix manual partitioning woes, and autodetect airootfs.sfs location
This commit is contained in:
parent
0ac3dbb743
commit
ab31e1dc4f
1 changed files with 19 additions and 3 deletions
18
blend-inst
18
blend-inst
|
@ -178,7 +178,7 @@ def inst_partition(config):
|
|||
filesystem = p.split(':')[2]
|
||||
blockdevice = p.split(':')[1]
|
||||
format_and_mount(mountpoint, filesystem, blockdevice)
|
||||
if '/mnt' not in mountpoints or '/mnt/' not in mountpoints:
|
||||
if '/mnt' not in mountpoints and '/mnt/' not in mountpoints:
|
||||
print()
|
||||
print('Invalid manual partitioning configuration. There must be a partition with its mount point as /.')
|
||||
sys.exit(1)
|
||||
|
@ -189,6 +189,22 @@ def inst_partition(config):
|
|||
|
||||
|
||||
def inst_setup_base(config):
|
||||
if testing == False:
|
||||
airootfs_files = [os.path.join(dirpath, filename)
|
||||
for (dirpath, dirs, files) in os.walk('/run/archiso')
|
||||
for filename in (dirs + files)]
|
||||
airootfs_sfs = 'none'
|
||||
for f in airootfs_files:
|
||||
if os.path.basename(f) == 'airootfs.sfs':
|
||||
airootfs_sfs = f
|
||||
break
|
||||
if airootfs_sfs == 'none':
|
||||
print("====================")
|
||||
print("Failed installation.")
|
||||
sys.exit(1)
|
||||
exec(['unsquashfs', '-f', '-d', '/mnt',
|
||||
airootfs_sfs])
|
||||
else:
|
||||
exec(['unsquashfs', '-f', '-d', '/mnt',
|
||||
'/run/archiso/bootmnt/blend/x86_64/airootfs.sfs'])
|
||||
# Enable system services
|
||||
|
|
Loading…
Reference in a new issue