mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
Generate entry for subvolume @swap
This commit is contained in:
parent
3f0612b4ad
commit
80a538665e
1 changed files with 8 additions and 1 deletions
|
@ -183,7 +183,7 @@ class FstabGenerator(object):
|
|||
print(FSTAB_HEADER, file=fstab_file)
|
||||
|
||||
for partition in self.partitions:
|
||||
# Special treatment for a btrfs root with @ and @home
|
||||
# Special treatment for a btrfs root with @, @home and @swap
|
||||
# subvolumes
|
||||
if (partition["fs"] == "btrfs"
|
||||
and partition["mountPoint"] == "/"):
|
||||
|
@ -206,6 +206,13 @@ class FstabGenerator(object):
|
|||
dct = self.generate_fstab_line_info(home_entry)
|
||||
if dct:
|
||||
self.print_fstab_line(dct, file=fstab_file)
|
||||
elif line.endswith(b'path @swap'):
|
||||
swap_part_entry = partition
|
||||
swap_part_entry["mountPoint"] = "/swap"
|
||||
swap_part_entry["subvol"] = "@swap"
|
||||
dct = self.generate_fstab_line_info(swap_part_entry)
|
||||
if dct:
|
||||
self.print_fstab_line(dct, file=fstab_file)
|
||||
|
||||
else:
|
||||
dct = self.generate_fstab_line_info(partition)
|
||||
|
|
Loading…
Add table
Reference in a new issue