Skip to content

Commit 7c86a2b

Browse files
authored
Merge pull request #456 from martinwhitaker/master
Fix Mageia support.
2 parents 7ef3781 + 67b3f6f commit 7c86a2b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scripts/grub.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def mbusb_update_grub_cfg():
5555
(loopback_cfg_list, lambda x: 'efi' in x.lower()),
5656
(loopback_cfg_list, lambda x: 'boot' in x.lower()),
5757
(grub_cfg_list, lambda x: 'efi' in x.lower()),
58-
(grub_cfg_list, lambda x: 'boot' in x.lower()),
58+
(grub_cfg_list, lambda x: 'boot' in x.lower() and 'efi' not in x.lower()),
5959
(loopback_cfg_list,
6060
lambda x: 'efi' not in x.lower() and 'boot' not in x.lower()),
6161
(grub_cfg_list,
@@ -66,7 +66,9 @@ def mbusb_update_grub_cfg():
6666
# We could 'break' here but will let the iteration continue
6767
# in order to lower the chance of keeping latent bugs.
6868

69-
if 0<len(candidates):
69+
if config.distro == 'mageialive' and 1<len(candidates):
70+
grub_cfg_path = candidates[1].replace('\\', '/')
71+
elif 0<len(candidates):
7072
grub_cfg_path = candidates[0].replace('\\', '/')
7173
else :
7274
# No suitable grub configuration file is provided by distro.

scripts/update_cfg_file.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
313313
'from=/multibootusb/' + iso_basename(iso_link) + '/' + iso_name(iso_link) + ' initrd=',
314314
string)
315315
elif distro == "mageialive":
316-
string = re.sub(r'LABEL=\S*', 'LABEL=' + usb_label, string)
316+
string = re.sub(r'LABEL=\S*', 'UUID=' + usb_uuid + ' mgalive.basedir=/multibootusb/' + iso_basename(iso_link),
317+
string)
317318
elif distro == "solydx":
318319
string = re.sub(r'live-media-path=', 'live-media-path=/multibootusb/' + iso_basename(iso_link),
319320
string)

0 commit comments

Comments
 (0)