mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
grub installation: fix: simplify code
This commit is contained in:
parent
282e7e6c84
commit
4ee2d39fbf
@ -499,11 +499,11 @@ my $efiTarget = getEfiTarget();
|
||||
my $prevGrubState = readGrubState();
|
||||
my @prevDeviceTargets = split/:/, $prevGrubState->devices;
|
||||
|
||||
my $devicesDiffer = scalar (List::Compare->new( '-u', '-a', \@deviceTargets, \@prevDeviceTargets)->get_symmetric_difference() );
|
||||
my $nameDiffer = !(get("fullName") eq $prevGrubState->name);
|
||||
my $versionDiffer = !(get("fullVersion") eq $prevGrubState->version);
|
||||
my $efiDiffer = !($efiTarget eq $prevGrubState->efi);
|
||||
my $efiMountPointDiffer = !($efiSysMountPoint eq $prevGrubState->efiMountPoint);
|
||||
my $devicesDiffer = scalar (List::Compare->new( '-u', '-a', \@deviceTargets, \@prevDeviceTargets)->get_symmetric_difference());
|
||||
my $nameDiffer = get("fullName") ne $prevGrubState->name;
|
||||
my $versionDiffer = get("fullVersion") ne $prevGrubState->version;
|
||||
my $efiDiffer = $efiTarget ne $prevGrubState->efi;
|
||||
my $efiMountPointDiffer = $efiSysMountPoint ne $prevGrubState->efiMountPoint;
|
||||
my $requireNewInstall = $devicesDiffer || $nameDiffer || $versionDiffer || $efiDiffer || $efiMountPointDiffer || (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1");
|
||||
|
||||
# install a symlink so that grub can detect the boot drive when set
|
||||
|
Loading…
Reference in New Issue
Block a user