grub: add grub.useOSProber option (#22558)
This commit is contained in:
committed by
Robin Gloster
parent
5d00edcf4f
commit
0b87efacb1
@@ -424,10 +424,17 @@ if ($extraPrepareConfig ne "") {
|
||||
system((get("shell"), "-c", $extraPrepareConfig));
|
||||
}
|
||||
|
||||
# Atomically update the GRUB config.
|
||||
# write the GRUB config.
|
||||
my $confFile = $grubVersion == 1 ? "$bootPath/grub/menu.lst" : "$bootPath/grub/grub.cfg";
|
||||
my $tmpFile = $confFile . ".tmp";
|
||||
writeFile($tmpFile, $conf);
|
||||
|
||||
# Append entries detected by os-prober
|
||||
if (get("useOsprober") eq "true") {
|
||||
system(get("shell"), "-c", "pkgdatadir=$grub/share/grub $grub/etc/grub.d/30_os-prober >> $tmpFile");
|
||||
}
|
||||
|
||||
# Atomically switch to the new config
|
||||
rename $tmpFile, $confFile or die "cannot rename $tmpFile to $confFile\n";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user