fix to compare kernel versions as strings instead as numbers

This commit is contained in:
Jordi Sanfeliu 2014-01-22 13:05:24 +01:00
parent 14ef25171b
commit abec035a39
2 changed files with 4 additions and 4 deletions

View File

@ -170,7 +170,7 @@ sub fs_init {
};
}
if($config->{os} eq "Linux" && $config->{kernel} > 2.4) {
if($config->{os} eq "Linux" && $config->{kernel} gt "2.4") {
my $lvm;
my $lvm_disk;
my $is_md;
@ -434,7 +434,7 @@ sub fs_update {
my $d = $fs->{devmap}->{$f};
if($d) {
if($config->{os} eq "Linux") {
if($config->{kernel} > 2.4) {
if($config->{kernel} gt "2.4") {
open(IN, "/proc/diskstats");
while(<IN>) {
if(/ $d /) {
@ -931,7 +931,7 @@ sub fs_cgi {
undef(@tmpz);
undef(@CDEF);
if($config->{os} eq "Linux") {
if($config->{kernel} > 2.4) {
if($config->{kernel} gt "2.4") {
$graph_title = "$config->{graphs}->{_fs3} ($tf->{nwhen}$tf->{twhen})";
$vlabel = "Milliseconds";
} else {

View File

@ -203,7 +203,7 @@ sub net_update {
while(<IN>) {
if(/Link/ && /$nl[$n]/) {
# Idrop column added in 8.0
if($config->{kernel} > 7.2) {
if($config->{kernel} gt "7.2") {
(undef, undef, undef, undef, $net_packs_in[$n], $net_error_in[$n], undef, $net_bytes_in[$n], $net_packs_out[$n], $net_error_out[$n], $net_bytes_out[$n]) = split(' ', $_);
} else {
(undef, undef, undef, undef, $net_packs_in[$n], $net_error_in[$n], $net_bytes_in[$n], $net_packs_out[$n], $net_error_out[$n], $net_bytes_out[$n]) = split(' ', $_);