Skip to content

Commit

Permalink
workunits/rgw: remove lsb_release
Browse files Browse the repository at this point in the history
The lsb_release utility brings in a lot of other dependencies. Remove
it from the RGW workunit Perl scripts.

Signed-off-by: Ken Dreyer <[email protected]>
  • Loading branch information
ktdreyer committed Aug 18, 2021
1 parent fcdf7f3 commit db66f6f
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions qa/workunits/rgw/s3_utilities.pm
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,28 @@ sub purge_data
return 0;
}

# Read PRETTY_NAME from /etc/os-release
sub os_pretty_name
{
open(FH, '<', '/etc/os-release') or die $!;
while (my $line = <FH>) {
chomp $line;
if ($line =~ /^\s*PRETTY_NAME=\"?([^"]*)\"?/) {
return $1;
}
}
close(FH);
}


# Function to get the Ceph and distro info
sub ceph_os_info
{
my $ceph_v = get_command_output ( "ceph -v" );
my @ceph_arr = split(" ",$ceph_v);
$ceph_v = "Ceph Version: $ceph_arr[2]";
my $os_distro = get_command_output ( "lsb_release -d" );
my @os_arr = split(":",$os_distro);
$os_distro = "Linux Flavor:$os_arr[1]";
my $os_distro = os_pretty_name()
$os_distro = "Linux Flavor:$os_distro";
return ($ceph_v, $os_distro);
}

Expand Down

0 comments on commit db66f6f

Please sign in to comment.