[mount] Experimental: accept 'no' for subvolumes

If there is no subvolume set, skip creation of that subvolume.
This allows root to be on a bare FS, without a tag or subvolume
name. To achieve this, use
    subvolume: no
(no quotes there) in the YAML.
This commit is contained in:
Adriaan de Groot 2021-12-01 23:06:02 +01:00
parent 3845e05834
commit 951ddfb72a

View file

@ -191,6 +191,8 @@ def mount_partition(root_mount_point, partition, partitions):
libcalamares.globalstorage.insert("btrfsSubvolumes", btrfs_subvolumes)
# Create the subvolumes that are in the completed list
for s in btrfs_subvolumes:
if not s["subvolume"]:
continue
subprocess.check_call(["btrfs", "subvolume", "create",
root_mount_point + s["subvolume"]])
if s["mountPoint"] == "/":