10 $root_part = `awk '{ if (\$2=="/") print \$1}' </etc/fstab`;
13 foreach $item (split("\n", $root_part))
17 $lilo_root_part = $item;
20 if($lilo_root_part =~ /\/dev\/md/)
22 my $mdname = $lilo_root_part;
23 $mdname =~ s/\/dev\///;
25 my $md = `grep $mdname /proc/mdstat`;
26 my @devices = split(" ", $md);
27 @devices = sort(@devices[4..$#devices]);
28 $lilo_root_part = "/dev/" . $devices[0];
29 $lilo_root_part =~ s/\[.*$//;
31 my $lilo_root_disk = $lilo_root_part;
32 $lilo_root_disk =~ s/\d+$//;
33 $lilo_root_disk =~ s/part$/disc/;
35 print $lilo_root_disk . "\n";