VersionCheck: Fixes for Gentoo and the BSDs

This commit is contained in:
Brian Fraser
2012-09-18 01:19:39 -03:00
parent 5eb168b827
commit e418dad610

View File

@@ -177,7 +177,7 @@ sub get_os_version {
}
}
}
elsif ( $platform =~ m/^(BSD|Darwin)$/ ) {
elsif ( $platform =~ m/(?:BSD|^Darwin)$/ ) {
my $rel = `uname -r`;
$release = "$platform $rel";
}
@@ -192,6 +192,9 @@ sub get_os_version {
}
chomp($release);
# For Gentoo, which returns a value in quotes
$release =~ s/^"|"$//g;
PTDEBUG && _d('OS version =', $release);
return $release;
}