mirror of
				https://github.com/fspc/gbootroot.git
				synced 2025-10-30 23:25:36 -04:00 
			
		
		
		
	Modified norm_root_device so that default is looked at separately in brlilo as explained in bug 111579
This commit is contained in:
		
							parent
							
								
									0d276c6e76
								
							
						
					
					
						commit
						b10d8401c3
					
				
							
								
								
									
										27
									
								
								gBootRoot
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								gBootRoot
									
									
									
									
									
								
							| @ -347,24 +347,26 @@ sub signal { | |||||||
| # Cristian's idea - bug 111579 enh for brlilo | # Cristian's idea - bug 111579 enh for brlilo | ||||||
| sub norm_root_device { | sub norm_root_device { | ||||||
| 
 | 
 | ||||||
|  my $norm_root_dev = "hda1";  |  | ||||||
| 
 |  | ||||||
|  if (!-d $lilo_conf) { |  if (!-d $lilo_conf) { | ||||||
|    if (-e $lilo_conf) {  |    if (-e $lilo_conf) {  | ||||||
|       open(LIL, $lilo_conf);  |       open(LIL, $lilo_conf);  | ||||||
|         while (<LIL>) {  |       my @lilo_lines = <LIL>; | ||||||
|           chomp;  |         for (@lilo_lines) { | ||||||
|           if ( m<   ^\s*[^#]+\s*root\s*=\s*/dev/([\w\d]+)\s*.*$ |           if ( m<^\s*[^#]+\s*default\s*=\s*/dev/([\w\d]+)\s*.*$> ) {   | ||||||
|                   | ^\s*[^#]+\s*default\s*=\s*/dev/([\w\d]+)\s*.*$ >x ) {   | 	        chomp, return $1; | ||||||
|              ($1) ? ($norm_root_dev = $1) : ($norm_root_dev = $2); | 	  } | ||||||
|              last;  | 	} | ||||||
|           }  |         for (@lilo_lines) { | ||||||
|  |           if ( m<^\s*[^#]+\s*root\s*=\s*/dev/([\w\d]+)\s*.*$> ) { | ||||||
|  | 	        chomp, return $1; | ||||||
|  | 	  } | ||||||
|  | 
 | ||||||
|         }  |         }  | ||||||
|    }  |    }  | ||||||
|  } |  } | ||||||
| 
 | 
 | ||||||
|  return $norm_root_dev; |  return "hda1"; | ||||||
|   | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| sub create_text { | sub create_text { | ||||||
| @ -887,9 +889,6 @@ sub lilo_put_it_together { | |||||||
|   $remain_boot = $remain_boot - (stat("/boot/boot.b"))[12]/2  - 3; |   $remain_boot = $remain_boot - (stat("/boot/boot.b"))[12]/2  - 3; | ||||||
|   $entry5->set_text("$remain_boot k"); |   $entry5->set_text("$remain_boot k"); | ||||||
| 
 | 
 | ||||||
|     # |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     # Write out the HEREDOCS |     # Write out the HEREDOCS | ||||||
|     open(LC, ">$mnt/brlilo.conf") or die "Couldn't write $mnt/brlilo.conf\n"; |     open(LC, ">$mnt/brlilo.conf") or die "Couldn't write $mnt/brlilo.conf\n"; | ||||||
|     print LC brlilo($device); close(LC); |     print LC brlilo($device); close(LC); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user