mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
Correct the path of swapfile on btrfs
This commit is contained in:
parent
80a538665e
commit
97eb32bf5c
1 changed files with 6 additions and 1 deletions
|
@ -386,6 +386,11 @@ def run():
|
||||||
swap_choice = swap_choice.get( "swap", None )
|
swap_choice = swap_choice.get( "swap", None )
|
||||||
if swap_choice and swap_choice == "file":
|
if swap_choice and swap_choice == "file":
|
||||||
# There's no formatted partition for it, so we'll sneak in an entry
|
# There's no formatted partition for it, so we'll sneak in an entry
|
||||||
|
root_partitions = [ p["fs"].lower() for p in partitions if p["mountPoint"] == "/" ]
|
||||||
|
root_btrfs = (root_partitions[0] == "btrfs") if root_partitions else False
|
||||||
|
if root_btrfs:
|
||||||
|
partitions.append( dict(fs="swap", mountPoint=None, claimed=True, device="/swap/swapfile", uuid=None) )
|
||||||
|
else:
|
||||||
partitions.append( dict(fs="swap", mountPoint=None, claimed=True, device="/swapfile", uuid=None) )
|
partitions.append( dict(fs="swap", mountPoint=None, claimed=True, device="/swapfile", uuid=None) )
|
||||||
else:
|
else:
|
||||||
swap_choice = None
|
swap_choice = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue