Merge pull request #456 from martinwhitaker/master

Fix Mageia support.
pull/460/head
multibootusb 5 years ago committed by GitHub
commit 7c86a2bdfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -55,7 +55,7 @@ def mbusb_update_grub_cfg():
(loopback_cfg_list, lambda x: 'efi' in x.lower()),
(loopback_cfg_list, lambda x: 'boot' in x.lower()),
(grub_cfg_list, lambda x: 'efi' in x.lower()),
(grub_cfg_list, lambda x: 'boot' in x.lower()),
(grub_cfg_list, lambda x: 'boot' in x.lower() and 'efi' not in x.lower()),
(loopback_cfg_list,
lambda x: 'efi' not in x.lower() and 'boot' not in x.lower()),
(grub_cfg_list,
@ -66,7 +66,9 @@ def mbusb_update_grub_cfg():
# We could 'break' here but will let the iteration continue
# in order to lower the chance of keeping latent bugs.
if 0<len(candidates):
if config.distro == 'mageialive' and 1<len(candidates):
grub_cfg_path = candidates[1].replace('\\', '/')
elif 0<len(candidates):
grub_cfg_path = candidates[0].replace('\\', '/')
else :
# No suitable grub configuration file is provided by distro.

@ -313,7 +313,8 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
'from=/multibootusb/' + iso_basename(iso_link) + '/' + iso_name(iso_link) + ' initrd=',
string)
elif distro == "mageialive":
string = re.sub(r'LABEL=\S*', 'LABEL=' + usb_label, string)
string = re.sub(r'LABEL=\S*', 'UUID=' + usb_uuid + ' mgalive.basedir=/multibootusb/' + iso_basename(iso_link),
string)
elif distro == "solydx":
string = re.sub(r'live-media-path=', 'live-media-path=/multibootusb/' + iso_basename(iso_link),
string)

Loading…
Cancel
Save