Skip to content

Commit

Permalink
lib/filesystem_utils.pm: Try lsblk -H as well
Browse files Browse the repository at this point in the history
lsblk --help no longer lists the possible columns.
  • Loading branch information
Vogtinator committed May 15, 2024
1 parent ea7d96e commit bb1660a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/filesystem_utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ sub get_used_partition_space {
is_lsblk_able_to_display_mountpoints();
Runs utility C<lsblk> using flag --help to retrieve to check for one specific
column 'MOUNTPOINTS'.
Runs utility C<lsblk> using flag -H or --help to check whether it supports
the column 'MOUNTPOINTS'.
From version util-linux-systemd-2.37 lsblk include new column MOUNTPOINTS
with all the mountpoints including all the subvolumes in a btrfs system
Expand All @@ -352,6 +352,7 @@ Please check bsc#1192996 for further info.
=cut

sub is_lsblk_able_to_display_mountpoints {
return 1 if script_run('lsblk -H | grep -w MOUNTPOINTS') == 0;
return script_run('lsblk --help | grep MOUNTPOINTS') == 0;
}

Expand Down

0 comments on commit bb1660a

Please sign in to comment.