mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[fstab] Document the remapping of fs names
- Shuffle the code a little so it's clear where the remapping happens, and explain why we look for "swap" in fstab and "linuxswap" elsewhere.
This commit is contained in:
parent
1b80cf82de
commit
f9d9cd2df4
1 changed files with 9 additions and 2 deletions
|
@ -232,14 +232,21 @@ class FstabGenerator(object):
|
|||
self.print_fstab_line(dct, file=fstab_file)
|
||||
|
||||
def generate_fstab_line_info(self, partition):
|
||||
""" Generates information for each fstab entry. """
|
||||
"""
|
||||
Generates information (a dictionary of fstab-fields)
|
||||
for the given @p partition.
|
||||
"""
|
||||
# Some "fs" names need special handling in /etc/fstab, so remap them.
|
||||
filesystem = partition["fs"].lower()
|
||||
filesystem = FS_MAP.get(filesystem, filesystem)
|
||||
has_luks = "luksMapperName" in partition
|
||||
mount_point = partition["mountPoint"]
|
||||
disk_name = disk_name_for_partition(partition)
|
||||
is_ssd = disk_name in self.ssd_disks
|
||||
filesystem = FS_MAP.get(filesystem, filesystem)
|
||||
|
||||
# Swap partitions are called "linuxswap" by parted.
|
||||
# That "fs" is visible in GS, but that gets mapped
|
||||
# to "swap", above, because that's the spelling needed in /etc/fstab
|
||||
if not mount_point and not filesystem == "swap":
|
||||
return None
|
||||
if not mount_point:
|
||||
|
|
Loading…
Add table
Reference in a new issue