partitioning: Use btrfs set-default MOUNT/subvolume

This simplifies the code, removing the need to grep/cut the output of btrfs subvolume list
This commit is contained in:
Franklyn Tackitt 2025-04-29 09:15:52 -07:00 committed by Igor
parent 76470b1dad
commit 4a8199b992

View File

@ -336,8 +336,7 @@ function prepare_partitions() {
# getting the subvolume id of the newly created volume @ to install it
# as the default volume for mounting without explicit reference
run_host_command_logged "btrfs subvolume list $MOUNT | grep 'path $btrfs_root_subvolume' | cut -d' ' -f2 \
| xargs -I{} btrfs subvolume set-default {} $MOUNT/ "
run_host_command_logged "btrfs subvolume set-default $MOUNT/$btrfs_root_subvolume"
call_extension_method "btrfs_root_add_subvolumes" <<- 'BTRFS_ROOT_ADD_SUBVOLUMES'
# *custom post btrfs rootfs creation hook*