From 4a8199b99243f06d4ab4d616270137ea0c21cc45 Mon Sep 17 00:00:00 2001 From: Franklyn Tackitt Date: Tue, 29 Apr 2025 09:15:52 -0700 Subject: [PATCH] partitioning: Use btrfs set-default MOUNT/subvolume This simplifies the code, removing the need to grep/cut the output of btrfs subvolume list --- lib/functions/image/partitioning.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/functions/image/partitioning.sh b/lib/functions/image/partitioning.sh index 12b9cb84eb..11e21a62c3 100644 --- a/lib/functions/image/partitioning.sh +++ b/lib/functions/image/partitioning.sh @@ -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*