Browse Source

This solves the problem of extra devices in boot_device_table.txt

master
freesource 23 years ago
parent
commit
44a5828e82
  1. 15
      gbootroot

15
gbootroot

@ -2772,7 +2772,10 @@ sub lilo_put_it_together {
# Keep a record of the devices required # Keep a record of the devices required
@devices = qw(/dev/null /dev/fd0 /dev/fd1 /dev/hda1); @devices = qw(/dev/null /dev/fd0 /dev/fd1 /dev/hda1);
for ( split(" ", $container[BOOT_DEVICE] ) ) { for ( split(" ", $container[BOOT_DEVICE] ) ) {
push(@devices, $_ ) if $_; my @existing_device_test = grep ( /$_/, @devices );
if ( !@existing_device_test ) {
push(@devices, $_ ) if $_;
}
} }
# This adds that next device if found in lilo.conf # This adds that next device if found in lilo.conf
@ -2780,7 +2783,7 @@ sub lilo_put_it_together {
if ( $norm_root_device ) { if ( $norm_root_device ) {
my @existing_device_test = my @existing_device_test =
grep ( /\/dev\/$norm_root_device/, @devices ); grep ( /\/dev\/$norm_root_device/, @devices );
if ( @existing_device_test ) { if ( !@existing_device_test ) {
push( @devices, "/dev/$norm_root_device" ); push( @devices, "/dev/$norm_root_device" );
} }
} }
@ -2788,10 +2791,15 @@ sub lilo_put_it_together {
# For frame buffer devices and the like. # For frame buffer devices and the like.
if ( $entry_advanced[1] ) { if ( $entry_advanced[1] ) {
for ( split(" ", $entry_advanced[1] ) ) { for ( split(" ", $entry_advanced[1] ) ) {
push(@devices, $_ ) if $_; my @existing_device_test = grep ( /$_/, @devices );
if ( !@existing_device_test ) {
push(@devices, $_ ) if $_;
}
} }
} }
info(0,"DEVICES @devices\n");
device_table( @devices ); device_table( @devices );
close(BootRoot::Yard::DEVICE_TABLE); close(BootRoot::Yard::DEVICE_TABLE);
@ -2818,6 +2826,7 @@ sub lilo_put_it_together {
return if errcp(sys("cp -a $entry_advanced[1] $mnt/dev")) == 2; return if errcp(sys("cp -a $entry_advanced[1] $mnt/dev")) == 2;
} }
} # end DEVICES SECTION } # end DEVICES SECTION
info(0, "Copy over important lilo stuff\n"); info(0, "Copy over important lilo stuff\n");

Loading…
Cancel
Save