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);
}