|
From: <jud...@us...> - 2006-07-21 21:12:02
|
Revision: 322 Author: judith_osdl Date: 2006-07-21 14:12:00 -0700 (Fri, 21 Jul 2006) ViewCVS: http://svn.sourceforge.net/stp/?rev=322&view=rev Log Message: ----------- This is a little hack for gentoo for now until I get the initrd working. Modified Paths: -------------- trunk/Test-Sut/lib/Test/Sut/Kernel.pm Modified: trunk/Test-Sut/lib/Test/Sut/Kernel.pm =================================================================== --- trunk/Test-Sut/lib/Test/Sut/Kernel.pm 2006-07-21 17:46:02 UTC (rev 321) +++ trunk/Test-Sut/lib/Test/Sut/Kernel.pm 2006-07-21 21:12:00 UTC (rev 322) @@ -58,7 +58,9 @@ $res = 0 unless ( -f "linux/System.map" and -f "linux/arch/$arch/boot/bzImage" ); unless ($self->kernel_version()){ $self->{'_ERR'}='compile_kernel'; return 0; } - system "mkinitrd -v -f /boot/initrd-STP.img $self->{'kernel_version'} &> $ENV{ 'SYSTEM_LOGS' }/mkinitrd.txt"; + unless ( -f '/etc/gentoo-release' ){ + system "mkinitrd -v -f /boot/initrd-STP.img $self->{'kernel_version'} &> $ENV{ 'SYSTEM_LOGS' }/mkinitrd.txt"; + } # We are done if there were no errors return 1 if ( $res ); @@ -141,7 +143,6 @@ # set up the hash to be passed to the add() function my %bootloader_hash = ( 'force' => 1, 'add-kernel' => '/boot/vmlinuz-STP', - 'initrd' => '/boot/initrd-STP.img', 'title' => 'STP', 'args' => $boot_opts, 'savedefault' => $default, @@ -154,6 +155,9 @@ if ( $myargs ){ $bootloader_hash->{'args'} .= $myargs; } + if ( -f '/boot/initrd-STP.img' ){ + $bootloader_hash->{'initrd'} = '/boot/initrd-STP.img'; + } # force the kernel to be added just in case we need to overwrite an old one $bootloader->add( %bootloader_hash ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |