fix to compare kernel versions as strings instead as numbers

This commit is contained in:
Jordi Sanfeliu 2014-01-22 13:08:49 +01:00
parent da948cb885
commit ebac0ddc3f
1 changed files with 5 additions and 3 deletions

View File

@ -388,9 +388,11 @@ $config{func_update} = ();
# get the current OS and kernel version and check its support
my $release;
($config{os}, undef, $release) = uname();
my ($major, $minor) = split('\.', $release);
$minor =~ m/^(\d+)/;
$config{kernel} = $major . "." . $1;
if(!($release =~ m/^(\d+)\.(\d+)/)) {
die "FATAL: unable to get the kernel version.";
}
$config{kernel} = "$1.$2";
if(!grep {$_ eq $config{os}} @suppsys) {
die "FATAL: your operating system ($config{os}) is not supported.";
}