mirror of
https://github.com/mbusb/multibootusb
synced 2024-11-01 15:40:16 +00:00
Added Fedora persistence. Bug fix for crash when uninstalling Sergei Strelec. Also fixed the knoppix bug.
This commit is contained in:
parent
7b7c50c1fb
commit
95245ffc63
@ -40,18 +40,17 @@ def persistence_distro(distro, usb_disk, iso_link):
|
||||
if distro == "ubuntu":
|
||||
print("Persistence option is available.")
|
||||
return "ubuntu", _max_size
|
||||
# FIXME to get debian persistence workable...
|
||||
# Able to add successfully but unable to keep persistence data.
|
||||
elif distro == "debian" or distro == "debian-install":
|
||||
print("Persistence option is available.")
|
||||
return "debian", _max_size
|
||||
else:
|
||||
return None, None
|
||||
# FIXME to get debian and fedora persistence workable...
|
||||
# Able to add successfully but unable to keep persistence data.
|
||||
'''
|
||||
elif distro == "fedora":
|
||||
elif distro == "fedora":
|
||||
print("Persistence option is available.")
|
||||
return "fedora", _max_size
|
||||
'''
|
||||
else:
|
||||
return None, None
|
||||
|
||||
|
||||
def create_persistence():
|
||||
if config.distro == "ubuntu":
|
||||
|
@ -185,7 +185,10 @@ def uninstall_progress():
|
||||
folder_size_to_remove = 0
|
||||
folder_size_to_remove += disk_usage(str(usb_mount) + "/multibootusb/" + config.uninstall_distro_dir_name).used
|
||||
elif config.distro == "windows" or config.distro == "Windows":
|
||||
folder_size_to_remove = disk_usage(str(usb_mount) + "/SOURCES").used
|
||||
if os.path.exists(os.path.join(usb_mount, "SOURCES")):
|
||||
folder_size_to_remove = disk_usage(str(usb_mount) + "/SOURCES").used
|
||||
else:
|
||||
folder_size_to_remove = disk_usage(str(usb_mount) + "/SSTR").used
|
||||
elif config.distro == "ipfire":
|
||||
folder_size_to_remove = disk_usage(str(usb_mount) + "/multibootusb/" + config.uninstall_distro_dir_name).used
|
||||
files = os.listdir(os.path.join(str(usb_mount)))
|
||||
|
@ -76,8 +76,8 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
|
||||
if re.search(r'liveimg', string, re.I):
|
||||
string = re.sub(r'liveimg', 'liveimg overlay=UUID=' + usb_uuid, string)
|
||||
elif re.search(r'rd.live.image', string, re.I):
|
||||
string = re.sub(r'rd.live.image', 'rd.live.image rd.live.overlay=UUID=' + usb_uuid, string)
|
||||
string = re.sub(r' ro ', ' rw ', string)
|
||||
string = re.sub(r'rd.live.image', 'rd.live.image rw rd.live.overlay=UUID=' + usb_uuid, string)
|
||||
string = re.sub(r' ro ', '', string)
|
||||
elif distro == 'kaspersky':
|
||||
if not os.path.exists(os.path.join(usb_mount, 'multibootusb', iso_basename(iso_link), 'kaspersky.cfg')):
|
||||
shutil.copyfile(resource_path(os.path.join('data', 'multibootusb', 'syslinux.cfg')),
|
||||
@ -111,9 +111,10 @@ def update_distro_cfg_files(iso_link, usb_disk, distro, persistence=0):
|
||||
string = re.sub(r'initrd=',
|
||||
r'from=/multibootusb/' + iso_basename(iso_link) + '/slax fromusb initrd=', string)
|
||||
elif distro == "knoppix":
|
||||
string = re.sub(r'(append)',
|
||||
r'\1 knoppix_dir=/multibootusb/' + iso_basename(iso_link) + '/KNOPPIX',
|
||||
string)
|
||||
string = re.sub(r'initrd=', 'knoppix_dir=/multibootusb/' + iso_basename(iso_link) + '/KNOPPIX initrd=', string)
|
||||
#string = re.sub(r'(append)',
|
||||
# r'\1 knoppix_dir=/multibootusb/' + iso_basename(iso_link) + '/KNOPPIX',
|
||||
# string)
|
||||
elif distro == "gentoo":
|
||||
string = re.sub(r'append ',
|
||||
'append real_root=' + usb_disk + ' slowusb subdir=/multibootusb/' +
|
||||
|
Loading…
Reference in New Issue
Block a user