From 640ddbca305005ed4a3c9e3d803676b39f2b50d3 Mon Sep 17 00:00:00 2001 From: freesource Date: Wed, 3 Oct 2001 05:10:03 +0000 Subject: [PATCH] This fixes kernel_version_check to return a value. --- BootRoot/Yard.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 6176eee..cc0c98c 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -91,7 +91,7 @@ sub logadj { $logadj = $_[0]; } sub kernel_version_check { my($kernel,$kernel_version) = @_; - + if (defined($kernel_version)) { # Check to see if it agrees my($version_guess) = kernel_version($kernel); @@ -103,6 +103,7 @@ sub kernel_version_check { "even though a probe says $version_guess.", " I'll assume you're right.\n") } + $ENV{'RELEASE'} = $kernel_version; } elsif (defined($ENV{'RELEASE'} = kernel_version($kernel))) { @@ -122,6 +123,8 @@ sub kernel_version_check { } } + return $ENV{'RELEASE'} if $ENV{'RELEASE'}; + } # end sub kernel_version_check ## This checks lib/modules/$version for rd.o, ext2.o, floppy.o @@ -1501,7 +1504,7 @@ sub kernel_version { $str = unpack("S",$str); #info (0, "Kernel setup header version is 0x"); - # 2.4.0 kernels now use Start Text 0x202 + # 2.4.0 kernels now use Start Text 0x202 - freesource unless ($str == 0x201 || $str == 0x0202) { print sprintf("%04x",$str);