summaryrefslogtreecommitdiffstats
path: root/knetworkconf/backends/platform.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'knetworkconf/backends/platform.pl.in')
-rw-r--r--knetworkconf/backends/platform.pl.in33
1 files changed, 31 insertions, 2 deletions
diff --git a/knetworkconf/backends/platform.pl.in b/knetworkconf/backends/platform.pl.in
index a3b52bb..7c8269e 100644
--- a/knetworkconf/backends/platform.pl.in
+++ b/knetworkconf/backends/platform.pl.in
@@ -71,6 +71,8 @@ $PLATFORM_INFO = {
"redhat-7.3" => "Red Hat Linux 7.3 Valhalla",
"redhat-8.0" => "Red Hat Linux 8.0 Psyche",
"redhat-9" => "Red Hat Linux 9.0 Shrike",
+ "rhel-5" => "Enterprise Linux 5",
+ "rhel-6" => "Enterprise Linux 6",
"openna-1.0" => "OpenNA Linux 1.0 VSLC",
"mandrake-7.1" => "Linux Mandrake 7.1",
"mandrake-7.2" => "Linux Mandrake 7.2 Odyssey",
@@ -123,6 +125,9 @@ $PLATFORM_INFO = {
"fedora-3" => "Fedora Core 3 (Heidelberg)",
"fedora-4" => "Fedora Core 4 (Stentz)",
"fedora-5" => "Fedora Core 5 (Bordeaux)",
+ "fedora-15" => "Fedora 15 (LoveLock)",
+ "fedora-16" => "Fedora 16 (Verne)",
+ "fedora-17" => "Fedora 17 (Beefy Miracle)",
"rpath" => "rPath Linux",
"ark" => "Ark Linux",
};
@@ -191,6 +196,27 @@ sub check_redhat
return -1;
}
+sub check_rhel
+{
+ open RELEASE, "$gst_prefix/etc/redhat-release" or return -1;
+ while (<RELEASE>)
+ {
+ chomp;
+ if (
+ (/^CentOS release (\d)([\d\.]+)\s+.*/)
+ or (/^Scientific Linux release (\d)([\d\.]+)\s+.*/)
+ or (/^Red Hat Enterprise Linux \w release (\d)([\d\.]+)\s+.*/)
+ )
+ {
+ close RELEASE;
+ return "rhel-$1";
+ }
+ }
+ close RELEASE;
+ return -1;
+}
+
+
sub check_openna
{
open OPENNA, "$gst_prefix/etc/openna-release" or return -1;
@@ -343,7 +369,10 @@ sub check_fedora
$ver = $_;
chomp ($ver);
- if ($ver =~ /^Fedora Core release (\S+)/)
+ if (
+ ($ver =~ /^Fedora Core release (\S+)/)
+ or ($ver =~ /^Fedora release (\S+)/)
+ )
{
close FEDORA;
return "fedora-$1";
@@ -584,7 +613,7 @@ sub gst_platform_guess
my %check = (
# Red Hat check must run after Vine, Mandrake and Fedora, and Mandrake after BlackPanther
"Linux" => [ \&check_lsb, \&check_debian, \&check_caldera, \&check_suse, \&check_blackpanther, \&check_vine,
- \&check_fedora, \&check_mandrake, \&check_mandriva, \&check_conectiva, \&check_linuxppc, \&check_redhat, \&check_openna,
+ \&check_fedora, \&check_mandrake, \&check_mandriva, \&check_conectiva, \&check_linuxppc, \&check_rhel, \&check_redhat, \&check_openna,
\&check_turbolinux, \&check_slackware, \&check_vlos, \&check_gentoo, \&check_pld, \&check_rpath, \&check_archlinux, \&check_ark ],
"FreeBSD" => [ \&check_freebsd ],
"SunOS" => [ \&check_solaris ]