In the distroname subroutine, there is code to translate distro names - is this really necessary?  Shouldn't this information come straight from the OS_Detect framework?
 
I am attaching the relevant code snippet here:
 
sub distroname {
    my ($name, $ver);
    # override distro detection
    if ($options{distro}) {
        ($name, $ver) = split /-/, $options{distro};
    } else {
        $name = $os->{linux_distro};
        $ver = $os->{linux_distro_version};
        # translate distro names
        if ($name eq "redhat-el-as" || $name eq "redhat-el-es" || $name eq "redh
at-el-ws") {
            $name = "rhel";
        } elsif ($name eq "fedora") {
            $name = "fc";
        } elsif ($name eq "mandrake") {
            $name = "mdk";
        }
    }
    return ($name,$ver);
}
 
Cheers,
 
Bernard

Reply via email to